Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/account/AccountHoverWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const account = ref<mastodon.v1.Account | null | undefined>(props.account)
watch(
() => [props.account, props.handle, hovered.value] satisfies WatcherType,
([newAccount, newHandle, newVisible], oldProps) => {
if (!newVisible || process.test)
if (!newVisible || import.meta.test)
return

if (newAccount) {
Expand Down
2 changes: 1 addition & 1 deletion app/composables/masto/masto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export function useStreaming(
stream.value = cb(streamingClient.value)
})

if (import.meta.client && !process.test)
if (import.meta.client && !import.meta.test)
useNuxtApp().$pageLifecycle.addFrozenListener(cleanup)

tryOnBeforeUnmount(() => isActive.value = false)
Expand Down
2 changes: 1 addition & 1 deletion app/composables/masto/statusDrafts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { STORAGE_KEY_DRAFTS } from '~/constants'
const MENTION_REGEX = /^(@\S+\s?)+/
const CODE_BLOCK_REGEX = /```/g

export const currentUserDrafts = (import.meta.server || process.test)
export const currentUserDrafts = (import.meta.server || import.meta.test)
? computed<DraftMap>(() => ({ home: [], dialog: [], intent: [], quote: [] }))
: useUserLocalStorage<DraftMap>(STORAGE_KEY_DRAFTS, () => ({ home: [], dialog: [], intent: [], quote: [] }))

Expand Down
2 changes: 1 addition & 1 deletion app/composables/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ interface UseUserLocalStorageCache {
* @param initial
*/
export function useUserLocalStorage<T extends object>(key: string, initial: () => T): Ref<T> {
if (import.meta.server || process.test)
if (import.meta.server || import.meta.test)
return shallowRef(initial())

// @ts-expect-error bind value to the function
Expand Down
Loading