pull/9549/head
Benedikt Werner 2021-07-15 16:33:42 +02:00
parent 15b5e30356
commit b5f6137e24
No known key found for this signature in database
GPG Key ID: 1DBFF0F8E9E121EB
1 changed files with 1 additions and 1 deletions

View File

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