Maybe this will work!

pull/1140/head
Gannicus 2024-04-06 20:32:51 -04:00
parent 55d607d8ea
commit c2084c3f2a
1 changed files with 1 additions and 5 deletions

View File

@ -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) {