Преглед изворни кода

improve proxy property warning

Evan You пре 10 година
родитељ
комит
a326c91056
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      src/core/instance/proxy.js

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

@@ -21,7 +21,8 @@ if (process.env.NODE_ENV !== 'production') {
       const isAllowedGlobal = allowedGlobals(key)
       const isAllowedGlobal = allowedGlobals(key)
       if (!has && !isAllowedGlobal) {
       if (!has && !isAllowedGlobal) {
         warn(
         warn(
-          `Trying to access non-existent property "${key}" while rendering.`,
+          `Trying to access non-existent property "${key}" while rendering. ` +
+          `Make sure to declare reactive data properties in the data option.`,
           target
           target
         )
         )
       }
       }