Skip to content

Commit 4120d1a

Browse files
chrisvfritzyyx990803
authored andcommitted
reference doc in component data function warning (vuejs#4378)
1 parent 1cf377f commit 4120d1a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/instance/state.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ function initData (vm: Component) {
7777
if (!isPlainObject(data)) {
7878
data = {}
7979
process.env.NODE_ENV !== 'production' && warn(
80-
'data functions should return an object.',
80+
'data functions should return an object:\n' +
81+
'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
8182
vm
8283
)
8384
}

0 commit comments

Comments
 (0)