Просмотр исходного кода

give task destructor the deps hash

Adam Shaw 8 лет назад
Родитель
Сommit
9d407ed794
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/common/Model.js

+ 3 - 3
src/common/Model.js

@@ -152,11 +152,11 @@ var Model = Class.extend(EmitterMixin, ListenerMixin, {
 			else {
 				_this.set(name, res);
 			}
-		}, function() {
+		}, function(deps) {
 			_this.unset(name);
 
 			if (stopFunc) {
-				stopFunc.call(_this);
+				stopFunc.call(_this, deps);
 			}
 		});
 	},
@@ -184,7 +184,7 @@ var Model = Class.extend(EmitterMixin, ListenerMixin, {
 			if (queuedChangeCnt === 1) { // first change to cause a "stop" ?
 				if (satisfyCnt === depCnt) { // all deps previously satisfied?
 					isCallingStop = true;
-					stopFunc();
+					stopFunc(values);
 					isCallingStop = false;
 				}
 			}