Skip to content

Commit 2f0945b

Browse files
committed
props: fix two-way prop setter on dynamic paths (fix #1378)
1 parent f887ed4 commit 2f0945b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/directives/internal/prop.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module.exports = {
1717
var prop = this.descriptor.prop
1818
var childKey = prop.path
1919
var parentKey = prop.parentPath
20+
var twoWay = prop.mode === bindingModes.TWO_WAY
2021

2122
var parentWatcher = this.parentWatcher = new Watcher(
2223
parent,
@@ -26,6 +27,7 @@ module.exports = {
2627
child[childKey] = val
2728
}
2829
}, {
30+
twoWay: twoWay,
2931
filters: prop.filters,
3032
// important: props need to be observed on the
3133
// v-for scope if present
@@ -37,7 +39,7 @@ module.exports = {
3739
_.initProp(child, prop, parentWatcher.value)
3840

3941
// setup two-way binding
40-
if (prop.mode === bindingModes.TWO_WAY) {
42+
if (twoWay) {
4143
// important: defer the child watcher creation until
4244
// the created hook (after data observation)
4345
var self = this

0 commit comments

Comments
 (0)