fixes
This commit is contained in:
parent
b8a0f540a3
commit
a62487b36b
7 changed files with 16 additions and 19 deletions
|
|
@ -95,8 +95,7 @@ export const filteredNotificationsFromStore = (
|
|||
types,
|
||||
) => {
|
||||
// map is just to clone the array since sort mutates it and it causes some issues
|
||||
const sortedNotifications = notificationsFromStore(store)
|
||||
.sort(sortById)
|
||||
const sortedNotifications = notificationsFromStore(store).sort(sortById)
|
||||
// TODO implement sorting elsewhere and make it optional
|
||||
return sortedNotifications.filter((notification) =>
|
||||
(types || visibleTypes(notificationVisibility)).includes(notification.type),
|
||||
|
|
|
|||
|
|
@ -359,7 +359,9 @@ export const getResourcesIndex = async (url, parser = (x) => x) => {
|
|||
|
||||
const total = [...custom, ...builtin]
|
||||
if (total.length === 0) {
|
||||
throw new Error(`Resource at ${url} and ${customUrl} completely unavailable. Panicking`)
|
||||
throw new Error(
|
||||
`Resource at ${url} and ${customUrl} completely unavailable. Panicking`,
|
||||
)
|
||||
}
|
||||
return Object.fromEntries(total)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,10 +28,8 @@ function getOrCreateServiceWorker() {
|
|||
}
|
||||
|
||||
function subscribePush(registration, isEnabled, vapidPublicKey) {
|
||||
if (!isEnabled)
|
||||
throw new Error('Web Push is disabled in config')
|
||||
if (!vapidPublicKey)
|
||||
throw new Error('VAPID public key is not found')
|
||||
if (!isEnabled) throw new Error('Web Push is disabled in config')
|
||||
if (!vapidPublicKey) throw new Error('VAPID public key is not found')
|
||||
|
||||
const subscribeOptions = {
|
||||
userVisibleOnly: false,
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ export const init = ({
|
|||
...r,
|
||||
})),
|
||||
)
|
||||
.flat()
|
||||
.flat(),
|
||||
...inputRuleset,
|
||||
].map((rule) => {
|
||||
normalizeCombination(rule)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue