diff --git a/ui/stores/context.ts b/ui/stores/context.ts index 3652aad4..046f1eb0 100644 --- a/ui/stores/context.ts +++ b/ui/stores/context.ts @@ -11,7 +11,7 @@ export const useContext = defineStore('context', { baseUrl: () => { let base = '' - if ( process.server ) { + if ( import.meta.server ) { const headers = useRequestHeaders() base = `http://${ headers.host }` diff --git a/ui/utils/string.ts b/ui/utils/string.ts index 93e34d18..141357f4 100644 --- a/ui/utils/string.ts +++ b/ui/utils/string.ts @@ -234,7 +234,7 @@ export function random32s(count: number): number[] { const out = [] let i: number - if ( process.server || typeof window === 'undefined' ) { + if ( import.meta.server || typeof window === 'undefined' ) { for ( i = 0; i < count; i++ ) { out[i] = crypto.randomBytes(4).readUInt32BE(0) }