Skip to content

Commit 6f7361b

Browse files
committed
properly initialize props with wrong initial type
1 parent 9dc0d7d commit 6f7361b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/util/component.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ function getIsBinding (el) {
7575
*/
7676

7777
export function initProp (vm, prop, value) {
78-
if (assertProp(prop, value)) {
79-
var key = prop.path
80-
vm[key] = vm._data[key] = value
81-
}
78+
const key = prop.path
79+
vm[key] = vm._data[key] = assertProp(prop, value)
80+
? value
81+
: undefined
8282
}
8383

8484
/**

0 commit comments

Comments
 (0)