fix: fix vue/no-ref-as-operand
and vue/return-in-computed-property
ESLint errors (#2679)
This commit is contained in:
parent
ed8a1811cc
commit
3b1a66c93c
9 changed files with 14 additions and 10 deletions
|
@ -59,7 +59,7 @@ export function useSearch(query: MaybeRefOrGetter<string>, options: UseSearchOpt
|
|||
}
|
||||
|
||||
watch(() => resolveUnref(query), () => {
|
||||
loading.value = !!(q && isHydrated.value)
|
||||
loading.value = !!(q.value && isHydrated.value)
|
||||
})
|
||||
|
||||
debouncedWatch(() => resolveUnref(query), async () => {
|
||||
|
@ -87,7 +87,7 @@ export function useSearch(query: MaybeRefOrGetter<string>, options: UseSearchOpt
|
|||
}, { debounce: 300 })
|
||||
|
||||
const next = async () => {
|
||||
if (!q || !isHydrated.value || !paginator)
|
||||
if (!q.value || !isHydrated.value || !paginator)
|
||||
return
|
||||
|
||||
loading.value = true
|
||||
|
|
|
@ -64,7 +64,7 @@ export function usePushManager() {
|
|||
policy?: mastodon.v1.WebPushSubscriptionPolicy,
|
||||
force?: boolean,
|
||||
): Promise<SubscriptionResult> => {
|
||||
if (!isSupported)
|
||||
if (!isSupported.value)
|
||||
return 'not-supported'
|
||||
|
||||
if (!currentUser.value)
|
||||
|
@ -112,7 +112,7 @@ export function usePushManager() {
|
|||
}
|
||||
|
||||
const unsubscribe = async () => {
|
||||
if (!isSupported || !isSubscribed || !currentUser.value)
|
||||
if (!isSupported.value || !isSubscribed.value || !currentUser.value)
|
||||
return false
|
||||
|
||||
await removePushNotifications(currentUser.value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue