fixes
This commit is contained in:
parent
b8a0f540a3
commit
a62487b36b
7 changed files with 16 additions and 19 deletions
|
|
@ -37,11 +37,7 @@ export const paramsString = (params = {}) => {
|
||||||
|
|
||||||
arrays.forEach(([k, array]) => {
|
arrays.forEach(([k, array]) => {
|
||||||
array.forEach((v) => {
|
array.forEach((v) => {
|
||||||
if (
|
if (typeof v === 'object' || typeof v === 'function' || v === undefined)
|
||||||
typeof v === 'object' ||
|
|
||||||
typeof v === 'function' ||
|
|
||||||
v === undefined
|
|
||||||
)
|
|
||||||
throw new TypeError('Array param cannot contain non-primitives!')
|
throw new TypeError('Array param cannot contain non-primitives!')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -305,11 +305,10 @@ const conversation = {
|
||||||
topLevel() {
|
topLevel() {
|
||||||
const topLevel = this.conversation.reduce(
|
const topLevel = this.conversation.reduce(
|
||||||
(tl, cur) =>
|
(tl, cur) =>
|
||||||
tl.filter(
|
tl.filter((k) =>
|
||||||
(k) =>
|
this.getReplies(cur.id)
|
||||||
this.getReplies(cur.id)
|
.map((v) => v.id)
|
||||||
.map((v) => v.id)
|
.includes(k.id),
|
||||||
.includes(k.id),
|
|
||||||
),
|
),
|
||||||
this.conversation,
|
this.conversation,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,10 @@ export default {
|
||||||
return this.$t(['settings', 'units', this.unitSet, value].join('.'))
|
return this.$t(['settings', 'units', this.unitSet, value].join('.'))
|
||||||
},
|
},
|
||||||
updateValue(e) {
|
updateValue(e) {
|
||||||
this.configSink(this.path, Number.parseFloat(e.target.value) + this.stateUnit)
|
this.configSink(
|
||||||
|
this.path,
|
||||||
|
Number.parseFloat(e.target.value) + this.stateUnit,
|
||||||
|
)
|
||||||
},
|
},
|
||||||
updateUnit(e) {
|
updateUnit(e) {
|
||||||
let value = this.stateValue
|
let value = this.stateValue
|
||||||
|
|
|
||||||
|
|
@ -95,8 +95,7 @@ export const filteredNotificationsFromStore = (
|
||||||
types,
|
types,
|
||||||
) => {
|
) => {
|
||||||
// map is just to clone the array since sort mutates it and it causes some issues
|
// map is just to clone the array since sort mutates it and it causes some issues
|
||||||
const sortedNotifications = notificationsFromStore(store)
|
const sortedNotifications = notificationsFromStore(store).sort(sortById)
|
||||||
.sort(sortById)
|
|
||||||
// TODO implement sorting elsewhere and make it optional
|
// TODO implement sorting elsewhere and make it optional
|
||||||
return sortedNotifications.filter((notification) =>
|
return sortedNotifications.filter((notification) =>
|
||||||
(types || visibleTypes(notificationVisibility)).includes(notification.type),
|
(types || visibleTypes(notificationVisibility)).includes(notification.type),
|
||||||
|
|
|
||||||
|
|
@ -359,7 +359,9 @@ export const getResourcesIndex = async (url, parser = (x) => x) => {
|
||||||
|
|
||||||
const total = [...custom, ...builtin]
|
const total = [...custom, ...builtin]
|
||||||
if (total.length === 0) {
|
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)
|
return Object.fromEntries(total)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,8 @@ function getOrCreateServiceWorker() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function subscribePush(registration, isEnabled, vapidPublicKey) {
|
function subscribePush(registration, isEnabled, vapidPublicKey) {
|
||||||
if (!isEnabled)
|
if (!isEnabled) throw new Error('Web Push is disabled in config')
|
||||||
throw new Error('Web Push is disabled in config')
|
if (!vapidPublicKey) throw new Error('VAPID public key is not found')
|
||||||
if (!vapidPublicKey)
|
|
||||||
throw new Error('VAPID public key is not found')
|
|
||||||
|
|
||||||
const subscribeOptions = {
|
const subscribeOptions = {
|
||||||
userVisibleOnly: false,
|
userVisibleOnly: false,
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ export const init = ({
|
||||||
...r,
|
...r,
|
||||||
})),
|
})),
|
||||||
)
|
)
|
||||||
.flat()
|
.flat(),
|
||||||
...inputRuleset,
|
...inputRuleset,
|
||||||
].map((rule) => {
|
].map((rule) => {
|
||||||
normalizeCombination(rule)
|
normalizeCombination(rule)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue