diff --git a/packages/sw/src/scripts/operations.ts b/packages/sw/src/scripts/operations.ts index 8936a7763..02217ed74 100644 --- a/packages/sw/src/scripts/operations.ts +++ b/packages/sw/src/scripts/operations.ts @@ -59,7 +59,7 @@ export async function findClient() { type: 'window', }); for (const c of clients) { - if (c.url.indexOf('?zen') < 0) return c; + if (!new URL(c.url).searchParams.has('zen')) return c; } return null; }