Skip to content

Commit 229f0b2

Browse files
committed
fix #685 by not caching dep subscriber length
1 parent bc254bf commit 229f0b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/observer/dep.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ p.removeSub = function (sub) {
4242
*/
4343

4444
p.notify = function () {
45-
for (var i = 0, l = this.subs.length; i < l; i++) {
46-
this.subs[i].update()
45+
for (var i = 0, subs = this.subs; i < subs.length; i++) {
46+
subs[i].update()
4747
}
4848
}
4949

0 commit comments

Comments
 (0)