Skip to content

Commit eed8523

Browse files
committed
Replace default sw url to be a template string literal
1 parent 5aefcb4 commit eed8523

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/messaging/src/helpers/registerDefaultSw.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import { trustedResourceUrl } from 'safevalues';
1919
import { safeServiceWorkerContainer } from 'safevalues/dom';
2020

21-
import { DEFAULT_SW_PATH, DEFAULT_SW_SCOPE } from '../util/constants';
21+
import { DEFAULT_SW_SCOPE } from '../util/constants';
2222
import { ERROR_FACTORY, ErrorCode } from '../util/errors';
2323

2424
import { MessagingService } from '../messaging-service';
@@ -30,7 +30,7 @@ export async function registerDefaultSw(
3030
const container = navigator.serviceWorker;
3131
messaging.swRegistration = await safeServiceWorkerContainer.register(
3232
container,
33-
trustedResourceUrl`${DEFAULT_SW_PATH}`,
33+
trustedResourceUrl`/firebase-messaging-sw.js`,
3434
{
3535
scope: DEFAULT_SW_SCOPE
3636
}

0 commit comments

Comments
 (0)