Skip to content

Improve error msg for non-reactive properties #6735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 3, 2017
Merged

Conversation

kutyel
Copy link
Contributor

@kutyel kutyel commented Oct 3, 2017

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Improved error message.

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:

Fixes #6657

@@ -42,7 +44,7 @@ if (process.env.NODE_ENV !== 'production') {
}

const hasHandler = {
has (target, key) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the code style changes?

referenced during render. Make sure that this property is reactive,
either in the data option, or for class-based components, by
initializing the property.
See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.`,
target
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to use concatenations for each line to avoid the whitespace between the lines.

@kutyel
Copy link
Contributor Author

kutyel commented Oct 3, 2017

Thanks, @yyx990803 should be ok right now 👌

@posva
Copy link
Member

posva commented Oct 3, 2017

@kutyel you can run npm run lint -- --fix to fix the lint problems

@yyx990803 yyx990803 merged commit cf3be87 into vuejs:dev Oct 3, 2017
@kutyel kutyel deleted the fix6657 branch October 3, 2017 16:03
ztlevi pushed a commit to ztlevi/vue that referenced this pull request Feb 14, 2018
f2009 pushed a commit to f2009/vue that referenced this pull request Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve error message for non-reactive properties
4 participants