aboutsummaryrefslogtreecommitdiff
path: root/src/sw.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/sw.js')
-rw-r--r--src/sw.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sw.js b/src/sw.js
index c971222e..f5e34dd6 100644
--- a/src/sw.js
+++ b/src/sw.js
@@ -40,10 +40,10 @@ const maybeShowNotification = async (event) => {
const url = `${self.registration.scope}api/v1/notifications/${data.notification_id}`
const notification = await fetch(url, { headers: { Authorization: 'Bearer ' + data.access_token } })
- let nj = await notification.json()
- nj = parseNotification(nj)
+ const notificationJson = await notification.json()
+ const parsedNotification = parseNotification(notificationJson)
- const res = prepareNotificationObject(nj, i18n)
+ const res = prepareNotificationObject(parsedNotification, i18n)
self.registration.showNotification(res.title, res)
}