Ver Fonte

trigger binding notify in the same order they are added

Evan You há 11 anos atrás
pai
commit
ed72137138
1 ficheiros alterados com 1 adições e 2 exclusões
  1. 1 2
      src/binding.js

+ 1 - 2
src/binding.js

@@ -42,8 +42,7 @@ p.removeSub = function (sub) {
  */
  */
 
 
 p.notify = function () {
 p.notify = function () {
-  var i = this.subs.length
-  while (i--) {
+  for (var i = 0, l = this.subs.length; i < l; i++) {
     this.subs[i].update()
     this.subs[i].update()
   }
   }
 }
 }