Maybe this will work!
parent
55d607d8ea
commit
c2084c3f2a
|
|
@ -97,9 +97,7 @@ export const Notifications = observer(() => {
|
|||
}
|
||||
|
||||
const reg =
|
||||
await navigator.serviceWorker.getRegistration(
|
||||
`${window.location.origin}/sw.js`,
|
||||
);
|
||||
await navigator.serviceWorker.getRegistration();
|
||||
|
||||
if (reg) {
|
||||
if (pushEnabled) {
|
||||
|
|
@ -113,8 +111,6 @@ export const Notifications = observer(() => {
|
|||
),
|
||||
});
|
||||
|
||||
console.log(sub);
|
||||
|
||||
// tell the server we just subscribed
|
||||
const json = sub.toJSON();
|
||||
if (json.keys) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue