Skip to content

Commit 024b074

Browse files
Fix error catching for IDBRequest.error. (#1401)
`event.target.errorCode` is undefined, use event.target.error instead.
1 parent 1baf7d6 commit 024b074

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/auth/src/storage/indexeddb.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ fireauth.storage.IndexedDB.prototype.onIDBRequest_ =
399399
}
400400
};
401401
request.onerror = function(event) {
402-
reject(new Error(event.target.errorCode));
402+
reject(event.target.error);
403403
};
404404
});
405405
};
@@ -566,7 +566,7 @@ fireauth.storage.IndexedDB.prototype.sync_ = function() {
566566
}
567567
};
568568
request.onerror = function(event) {
569-
reject(new Error(event.target.errorCode));
569+
reject(event.target.error);
570570
};
571571
});
572572
}

0 commit comments

Comments
 (0)