Browse Source

reference doc in component data function warning (#4378)

Chris Fritz 9 years ago
parent
commit
4120d1adc2
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/core/instance/state.js

+ 2 - 1
src/core/instance/state.js

@@ -77,7 +77,8 @@ function initData (vm: Component) {
   if (!isPlainObject(data)) {
     data = {}
     process.env.NODE_ENV !== 'production' && warn(
-      'data functions should return an object.',
+      'data functions should return an object:\n' +
+      'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
       vm
     )
   }