Skip to content

Commit

Permalink
Fix(oidc): usage of config option service_worker_register (#1440) (re…
Browse files Browse the repository at this point in the history
…lease)

Signed-off-by: Thomas Miliopoulos <github@thiscode.com>
  • Loading branch information
thiscode authored Aug 25, 2024
1 parent 8d4c695 commit d15a57d
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 d15a57d

Please sign in to comment.