fix(zone): correct incorrect calls to zone

This commit is contained in:
Misko Hevery 2015-12-22 20:54:19 -08:00 committed by Victor Berchet
parent 566d3ede04
commit 321193889f

View File

@ -422,14 +422,14 @@ export class NgZone {
fn(); fn();
ListWrapper.remove(ngZone._pendingTimeouts, id); ListWrapper.remove(ngZone._pendingTimeouts, id);
}; };
id = parentSetTimeout(cb, delay, args); id = parentSetTimeout.call(this, cb, delay, args);
ngZone._pendingTimeouts.push(id); ngZone._pendingTimeouts.push(id);
return id; return id;
}; };
}, },
'$clearTimeout': function(parentClearTimeout) { '$clearTimeout': function(parentClearTimeout) {
return function(id: number) { return function(id: number) {
parentClearTimeout(id); parentClearTimeout.call(this, id);
ListWrapper.remove(ngZone._pendingTimeouts, id); ListWrapper.remove(ngZone._pendingTimeouts, id);
}; };
}, },