Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-chervet committed Jan 12, 2025
1 parent 77a6747 commit 8c4fadc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions examples/react-oidc-demo/src/utils/timer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const timer = (function () {
const blob = new Blob(['(', workerCode, ')()'], { type: 'application/javascript' });
blobURL = URL.createObjectURL(blob);
} catch (error) {
console.warn(`Blob not available ${error.toString()}`);
return null;
}
const isInsideBrowser = typeof process === 'undefined';
Expand All @@ -70,7 +71,7 @@ const timer = (function () {
}
} catch (error) {
if (isInsideBrowser) {
console.warn('SharedWorker not available');
console.warn(`SharedWorker not available ${error.toString()}`);
}
}
try {
Expand All @@ -80,7 +81,7 @@ const timer = (function () {
}
} catch (error) {
if (isInsideBrowser) {
console.warn('Worker not available');
console.warn(`Worker not available ${error.toString()}`);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export function normalizeUrl(url: string) {
try {
return new URL(url).toString();
} catch (error) {
console.error(`Failed to normalize url: ${url}`);
console.error(`Failed to normalize url: ${url}`, error);
return url;
}
}
1 change: 1 addition & 0 deletions packages/oidc-client/src/initWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export const initWorkerAsync = async (
if (!navigator.serviceWorker.controller)
await sendMessageAsync(registration)({ type: 'claim' });
} catch (err) {
console.warn(`Failed init ServiceWorker ${err.toString()}`);
return null;
}

Expand Down

0 comments on commit 8c4fadc

Please sign in to comment.