Merge pull request #2032 from knoxHuang/v1.6

update unschedule code  jsb-etc.js fix fireball/issues/6432
This commit is contained in:
Jare Guo
2017-10-10 03:57:39 -05:00
committed by GitHub
+5 -1
View File
@@ -82,8 +82,12 @@ cc.Scheduler.prototype.unschedule = function (callback, target) {
target = callback;
callback = tmp;
}
if (callback.__callbackId === undefined) {
return;
}
var instanceId = target.__instanceId || target.uuid;
cc.assertID(instanceId !== undefined && callback.__callbackId !== undefined, 1510);
cc.assertID(instanceId !== undefined, 1510);
var key = instanceId + '_' + callback.__callbackId;
this._unschedule(key, target);
};