fix safari notifications error

This commit is contained in:
keyan 2023-07-04 18:02:22 -05:00
parent a17b4d1f1a
commit 19c743f70d
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ function NotificationAlert () {
const isSupported = sw.support.serviceWorker && sw.support.pushManager && sw.support.notification
const isDefaultPermission = sw.permission.notification === 'default'
setShowAlert(isSupported && isDefaultPermission && !localStorage.getItem('hideNotifyPrompt'))
sw.registration?.pushManager.getSubscription().then(subscription => setHasSubscription(!!subscription))
isSupported && sw.registration?.pushManager.getSubscription().then(subscription => setHasSubscription(!!subscription))
}, [sw])
const close = () => {