Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
fix(angular-mocks): fix .defer.cancel when i=0
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorMinar committed Sep 16, 2011
1 parent 3ace81b commit 62ae7fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/angular-mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function MockBrowser() {
if (fn.id === deferId) fnIndex = index;
});

if (fnIndex) {
if (fnIndex !== undefined) {
self.deferredFns.splice(fnIndex, 1);
}
};
Expand Down

0 comments on commit 62ae7fc

Please sign in to comment.