fix safari notifications error
This commit is contained in:
parent
a17b4d1f1a
commit
19c743f70d
@ -264,7 +264,7 @@ function NotificationAlert () {
|
|||||||
const isSupported = sw.support.serviceWorker && sw.support.pushManager && sw.support.notification
|
const isSupported = sw.support.serviceWorker && sw.support.pushManager && sw.support.notification
|
||||||
const isDefaultPermission = sw.permission.notification === 'default'
|
const isDefaultPermission = sw.permission.notification === 'default'
|
||||||
setShowAlert(isSupported && isDefaultPermission && !localStorage.getItem('hideNotifyPrompt'))
|
setShowAlert(isSupported && isDefaultPermission && !localStorage.getItem('hideNotifyPrompt'))
|
||||||
sw.registration?.pushManager.getSubscription().then(subscription => setHasSubscription(!!subscription))
|
isSupported && sw.registration?.pushManager.getSubscription().then(subscription => setHasSubscription(!!subscription))
|
||||||
}, [sw])
|
}, [sw])
|
||||||
|
|
||||||
const close = () => {
|
const close = () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user