Skip to content

Commit 374948d

Browse files
Use name property
1 parent 32bb104 commit 374948d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/firestore/src/local/simple_db.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,8 @@ export interface IterateOptions {
408408

409409
/** An error that wraps exceptions that thrown during IndexedDB execution. */
410410
export class SimpleDbTransactionError extends FirestoreError {
411+
name = 'SimpleDbTransactionError';
412+
411413
constructor(cause: Error) {
412414
super(
413415
Code.UNKNOWN,

packages/firestore/src/util/async_queue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ export class AsyncQueue {
339339
deferred.resolve();
340340
this.backoff.reset();
341341
} catch (e) {
342-
if (e instanceof SimpleDbTransactionError) {
342+
if (e.name === 'SimpleDbTransactionError') {
343343
logDebug(LOG_TAG, 'Operation failed with retryable error: ' + e);
344344
this.backoff.backoffAndRun(retryingOp);
345345
} else {

0 commit comments

Comments
 (0)