This commit is contained in:
Henry Jameson 2026-08-04 20:55:55 +03:00
commit 11054bdad7
7 changed files with 17 additions and 21 deletions

View file

@ -29,9 +29,9 @@ function getOrCreateServiceWorker() {
function subscribePush(registration, isEnabled, vapidPublicKey) {
if (!isEnabled)
return Promise.reject(new Error('Web Push is disabled in config'))
throw new Error('Web Push is disabled in config')
if (!vapidPublicKey)
return Promise.reject(new Error('VAPID public key is not found'))
throw new Error('VAPID public key is not found')
const subscribeOptions = {
userVisibleOnly: false,