Skip to content

Commit 8d9b626

Browse files
kutyelhefeng
authored andcommitted
refactor: improve error msg for non-reactive properties (vuejs#6735)
close vuejs#6657
1 parent 32f8297 commit 8d9b626

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/core/instance/proxy.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ if (process.env.NODE_ENV !== 'production') {
1515

1616
const warnNonPresent = (target, key) => {
1717
warn(
18-
`Property or method "${key}" is not defined on the instance but ` +
19-
`referenced during render. Make sure to declare reactive data ` +
20-
`properties in the data option.`,
18+
`Property or method "${key}" is not defined on the instance but` +
19+
'referenced during render. Make sure that this property is reactive, ' +
20+
'either in the data option, or for class-based components, by ' +
21+
'initializing the property.' +
22+
'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
2123
target
2224
)
2325
}

0 commit comments

Comments
 (0)