Skip to content

Commit 5a0de87

Browse files
committed
$add should notify regardless of whether the ob has associated vms (fix vuejs#873)
1 parent d04315e commit 5a0de87

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/observer/object.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,14 @@ _.define(
2121
return
2222
}
2323
ob.convert(key, val)
24+
ob.notify()
2425
if (ob.vms) {
2526
var i = ob.vms.length
2627
while (i--) {
2728
var vm = ob.vms[i]
2829
vm._proxy(key)
2930
vm._digest()
3031
}
31-
} else {
32-
ob.notify()
3332
}
3433
}
3534
)
@@ -70,15 +69,14 @@ _.define(
7069
if (!ob || _.isReserved(key)) {
7170
return
7271
}
72+
ob.notify()
7373
if (ob.vms) {
7474
var i = ob.vms.length
7575
while (i--) {
7676
var vm = ob.vms[i]
7777
vm._unproxy(key)
7878
vm._digest()
7979
}
80-
} else {
81-
ob.notify()
8280
}
8381
}
8482
)

0 commit comments

Comments
 (0)