Skip to content

Commit

Permalink
Fix usg of config option service_worker_register
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Miliopoulos <[email protected]>
  • Loading branch information
thiscode committed Aug 23, 2024
1 parent 8d4c695 commit 7835104
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/oidc-client/src/initWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const initWorkerAsync = async (configuration, configurationName) => {
}

let registration = null;
if (configuration.register) {
if (configuration.register || configuration.service_worker_register) {
registration = await configuration.service_worker_register(serviceWorkerRelativeUrl);
} else {
registration = await navigator.serviceWorker.register(serviceWorkerRelativeUrl);
Expand Down

0 comments on commit 7835104

Please sign in to comment.