Skip to content

Commit

Permalink
fix prop validation incorrectly setting observerState.shouldConvert
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jul 24, 2016
1 parent 3e0cda6 commit 2456cd2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/util/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ export function validateProp (
value = getPropDefaultValue(vm, prop, key)
// since the default value is a fresh copy,
// make sure to observe it.
const prevShouldConvert = observerState.shouldConvert
observerState.shouldConvert = true
observe(value)
observerState.shouldConvert = false
observerState.shouldConvert = prevShouldConvert
}
if (process.env.NODE_ENV !== 'production') {
assertProp(prop, key, value, vm, absent)
Expand Down

0 comments on commit 2456cd2

Please sign in to comment.