mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-27 15:04:02 +00:00
fix(angular-mocks): fix .defer.cancel when i=0
This commit is contained in:
parent
855971c385
commit
62d34e1437
1 changed files with 1 additions and 1 deletions
2
src/angular-mocks.js
vendored
2
src/angular-mocks.js
vendored
|
|
@ -300,7 +300,7 @@ function MockBrowser() {
|
||||||
if (fn.id === deferId) fnIndex = index;
|
if (fn.id === deferId) fnIndex = index;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (fnIndex) {
|
if (fnIndex !== undefined) {
|
||||||
self.deferredFns.splice(fnIndex, 1);
|
self.deferredFns.splice(fnIndex, 1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue