From 56a04684c1fb77ea7b21afc6b0d2e1c4773906f6 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 11 Feb 2026 20:10:43 -0800 Subject: format --- src/service-worker.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/service-worker.js') diff --git a/src/service-worker.js b/src/service-worker.js index 383f62d0..9d33d322 100644 --- a/src/service-worker.js +++ b/src/service-worker.js @@ -19,17 +19,15 @@ self.addEventListener("notificationclick", (event) => { const url = event.notification.data.url || "/"; event.waitUntil( - clients - .matchAll({ type: "window", includeUncontrolled: true }) - .then((clientList) => { - for (const client of clientList) { - if (client.url === url && "focus" in client) { - return client.focus(); - } + clients.matchAll({ type: "window", includeUncontrolled: true }).then((clientList) => { + for (const client of clientList) { + if (client.url === url && "focus" in client) { + return client.focus(); } - if (clients.openWindow) { - return clients.openWindow(url); - } - }), + } + if (clients.openWindow) { + return clients.openWindow(url); + } + }), ); }); -- cgit v1.2.3