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 3ace81b92a
commit 62ae7fccbc

View file

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