Skip to content

Commit

Permalink
Replace default sw url to be a template string literal
Browse files Browse the repository at this point in the history
  • Loading branch information
dlarocque committed Jun 5, 2024
1 parent 5aefcb4 commit eed8523
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/messaging/src/helpers/registerDefaultSw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import { trustedResourceUrl } from 'safevalues';
import { safeServiceWorkerContainer } from 'safevalues/dom';

import { DEFAULT_SW_PATH, DEFAULT_SW_SCOPE } from '../util/constants';
import { DEFAULT_SW_SCOPE } from '../util/constants';
import { ERROR_FACTORY, ErrorCode } from '../util/errors';

import { MessagingService } from '../messaging-service';
Expand All @@ -30,7 +30,7 @@ export async function registerDefaultSw(
const container = navigator.serviceWorker;
messaging.swRegistration = await safeServiceWorkerContainer.register(
container,
trustedResourceUrl`${DEFAULT_SW_PATH}`,
trustedResourceUrl`/firebase-messaging-sw.js`,
{
scope: DEFAULT_SW_SCOPE
}
Expand Down

0 comments on commit eed8523

Please sign in to comment.