Skip to content

Commit 15a0524

Browse files
committed
Fix 2 small errors
1 parent dd0ecc7 commit 15a0524

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/app-check/src/internal-api.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export async function getToken(
128128
shouldCallListeners = true;
129129
}
130130
const tokenFromDebugExchange: AppCheckTokenInternal =
131-
await state.exchangeTokenPromise!;
131+
await state.exchangeTokenPromise;
132132
// Write debug token to indexedDB.
133133
await writeTokenToStorage(app, tokenFromDebugExchange);
134134
// Write debug token to state.
@@ -171,7 +171,7 @@ export async function getToken(
171171
// If token is undefined, there must be an error.
172172
// Return a dummy token along with the error.
173173
interopTokenResult = makeDummyTokenResult(error!);
174-
} else if (error && isValid(token)) {
174+
} else if (error) {
175175
if (isValid(token)) {
176176
// It's also possible a valid token exists, but there's also an error.
177177
// (Such as if the token is almost expired, tries to refresh, and

0 commit comments

Comments
 (0)