@asteby/metacore-starter-core 7.0.1 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -375,7 +375,9 @@ var $e = new class {
|
|
|
375
375
|
}
|
|
376
376
|
try {
|
|
377
377
|
let e = await L.get("/push/public-key");
|
|
378
|
-
e.data?.publicKey && (this.vapidPublicKey = e.data.publicKey, console.log("✅ VAPID public key loaded"))
|
|
378
|
+
e.data?.publicKey && (this.vapidPublicKey = e.data.publicKey, console.log("✅ VAPID public key loaded"));
|
|
379
|
+
let t = await navigator.serviceWorker.ready;
|
|
380
|
+
this.subscription = await t.pushManager.getSubscription(), this.subscription && console.log("✅ Existing push subscription found");
|
|
379
381
|
} catch (e) {
|
|
380
382
|
console.error("Failed to initialize push service:", e);
|
|
381
383
|
}
|