Skip to content

Commit 3b34952

Browse files
Add assert
1 parent a1faa32 commit 3b34952

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/firestore/src/remote/remote_store.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,10 @@ export class RemoteStore implements TargetMetadataProvider {
772772
// fresh auth token for the new user and re-fill the write pipeline with
773773
// new mutations from the LocalStore (since mutations are per-user).
774774
logDebug(LOG_TAG, 'RemoteStore received new credentials');
775+
debugAssert(
776+
!this.offlineCauses.has(OfflineCause.CredentialChange),
777+
'Only one credential change should be processed at a time'
778+
);
775779
this.offlineCauses.add(OfflineCause.CredentialChange);
776780

777781
await this.disableNetworkInternal();

0 commit comments

Comments
 (0)