Skip to content

Commit cf3be87

Browse files
kutyelyyx990803
authored andcommitted
refactor: improve error msg for non-reactive properties (#6735)
close #6657
1 parent c64f9ae commit cf3be87

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: src/core/instance/proxy.js

+5-3
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)