fix: fix vue/no-ref-as-operand and vue/return-in-computed-property ESLint errors (#2679)

This commit is contained in:
TAKAHASHI Shuuji 2024-03-11 19:53:25 +09:00 committed by GitHub
parent ed8a1811cc
commit 3b1a66c93c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 14 additions and 10 deletions

View file

@ -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

View file

@ -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)