Skip to content

Commit

Permalink
refactor: keep single source of truth (vuejs#8334)
Browse files Browse the repository at this point in the history
liximomo authored and yyx990803 committed Oct 24, 2018
1 parent 5489339 commit 6eaf56e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/instance/state.js
Original file line number Diff line number Diff line change
@@ -86,7 +86,7 @@ function initProps (vm: Component, propsOptions: Object) {
)
}
defineReactive(props, key, value, () => {
if (vm.$parent && !isUpdatingChildComponent) {
if (!isRoot && !isUpdatingChildComponent) {
warn(
`Avoid mutating a prop directly since the value will be ` +
`overwritten whenever the parent component re-renders. ` +

0 comments on commit 6eaf56e

Please sign in to comment.