From 36170a11f5b889cae3feda6bd4c666aafee98fef Mon Sep 17 00:00:00 2001 From: tamaina Date: Sat, 18 Feb 2023 05:16:34 +0000 Subject: refactor(sw): self => globalThis --- packages/sw/src/scripts/operations.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/sw/src/scripts/operations.ts') diff --git a/packages/sw/src/scripts/operations.ts b/packages/sw/src/scripts/operations.ts index 4d693223b2..8936a7763a 100644 --- a/packages/sw/src/scripts/operations.ts +++ b/packages/sw/src/scripts/operations.ts @@ -51,11 +51,11 @@ export async function openClient(order: swMessageOrderType, url: string, loginId return client; } - return self.clients.openWindow(getUrlWithLoginId(url, loginId)); + return globalThis.clients.openWindow(getUrlWithLoginId(url, loginId)); } export async function findClient() { - const clients = await self.clients.matchAll({ + const clients = await globalThis.clients.matchAll({ type: 'window', }); for (const c of clients) { -- cgit v1.2.3-freya