Skip to content

Commit 2456cd2

Browse files
committed
fix prop validation incorrectly setting observerState.shouldConvert
1 parent 3e0cda6 commit 2456cd2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/util/props.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ export function validateProp (
3535
value = getPropDefaultValue(vm, prop, key)
3636
// since the default value is a fresh copy,
3737
// make sure to observe it.
38+
const prevShouldConvert = observerState.shouldConvert
3839
observerState.shouldConvert = true
3940
observe(value)
40-
observerState.shouldConvert = false
41+
observerState.shouldConvert = prevShouldConvert
4142
}
4243
if (process.env.NODE_ENV !== 'production') {
4344
assertProp(prop, key, value, vm, absent)

0 commit comments

Comments
 (0)