fix(angular-mocks): fix .defer.cancel when i=0

This commit is contained in:
Igor Minar 2011-09-16 14:18:45 +02:00
parent 855971c385
commit 62d34e1437

View file

@ -300,7 +300,7 @@ function MockBrowser() {
if (fn.id === deferId) fnIndex = index;
});
if (fnIndex) {
if (fnIndex !== undefined) {
self.deferredFns.splice(fnIndex, 1);
}
};