Skip to content
Snippets Groups Projects
Commit e2ca107e authored by lain's avatar lain
Browse files

ServiceWorker: Don't show message via sw if a client is active.

parent 5b0190be
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,7 @@ const maybeShowNotification = async (event) => {
const enabled = await isEnabled()
const activeClients = await getWindowClients()
await setLocale()
if (enabled && activeClients) {
if (enabled && (activeClients.length === 0)) {
const data = event.data.json()
const url = `${self.registration.scope}api/v1/notifications/${data.notification_id}`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment