aboutsummaryrefslogtreecommitdiffstats
path: root/src/service-worker.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-11 20:10:43 -0800
committerAdam Soltys <[email protected]>2026-02-11 20:10:43 -0800
commit56a04684c1fb77ea7b21afc6b0d2e1c4773906f6 (patch)
treed6bc2557c56b93177bb14aa376847c6e123a4862 /src/service-worker.js
parent13466248004327e9a026cb89f94926f9b060d1c1 (diff)
downloadcoinos-ui-56a04684c1fb77ea7b21afc6b0d2e1c4773906f6.tar.gz
coinos-ui-56a04684c1fb77ea7b21afc6b0d2e1c4773906f6.zip
format
Diffstat (limited to 'src/service-worker.js')
-rw-r--r--src/service-worker.js20
1 files changed, 9 insertions, 11 deletions
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);
+ }
+ }),
);
});