Skip to content

Commit 745dbbe

Browse files
committed
fixup! fix(clerk-js): Prevent session cookie removal during offline token refresh
1 parent 63b96c1 commit 745dbbe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/clerk-js/src/core/resources/Session.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createCheckAuthorization } from '@clerk/shared/authorization';
2-
import { isValidBrowserOnline } from '@clerk/shared/browser';
2+
import { isBrowserOnline, isValidBrowserOnline } from '@clerk/shared/browser';
33
import {
44
ClerkOfflineError,
55
ClerkRuntimeError,
@@ -454,7 +454,7 @@ export class Session extends BaseResource implements SessionResource {
454454
}
455455
result = cachedToken.getRawString() || null;
456456
} else {
457-
if (!isValidBrowserOnline()) {
457+
if (!isBrowserOnline()) {
458458
throw new ClerkRuntimeError('Browser is offline, skipping token fetch', { code: 'network_error' });
459459
}
460460
result = await this.#fetchToken(template, organizationId, tokenId, shouldDispatchTokenUpdate, skipCache);

0 commit comments

Comments
 (0)