Prettier
parent
15b5e30356
commit
b5f6137e24
|
@ -21,7 +21,7 @@ export default function () {
|
|||
const store = storage.make('push-subscribed');
|
||||
const vapid = document.body.getAttribute('data-vapid');
|
||||
if (vapid && Notification.permission == 'granted')
|
||||
reg.pushManager.getSubscription().then(sub => {
|
||||
reg.pushManager.getSubscription().then(sub => {
|
||||
const resub = parseInt(store.get() || '0', 10) + 43200000 < Date.now(); // 12 hours
|
||||
const applicationServerKey = Uint8Array.from(atob(vapid), c => c.charCodeAt(0));
|
||||
if (!sub || resub) {
|
||||
|
|
Loading…
Reference in New Issue