fix(sw): プッシュ通知の操作でZen UIなクライアントが開かれてしまう場合がある問題を修正 (#10497) (#10498)

This commit is contained in:
okayurisotto 2023-04-07 15:48:49 +09:00 committed by GitHub
parent 58c8d21348
commit 69828e8dac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}