Not crashing when not supplying push-data thingies

This commit is contained in:
Kasper Rynning-Tønnesen
2020-03-02 13:33:44 +01:00
parent 45c994d473
commit 6589425e54
6 changed files with 28 additions and 8 deletions

View File

@@ -4,7 +4,7 @@ var serviceWorkerRegistrationMixin = {
console.log("Nettleseren din støtter ikke service-workers.");
return;
}
if ("PushManager" in window) {
if ("PushManager" in window && __PUSHENABLED__) {
if (Notification.permission !== "granted") {
localStorage.removeItem("push");
}