diff --git a/src/runtime/composables/visual-editing.ts b/src/runtime/composables/visual-editing.ts index 084ed2e2..3404aaf3 100644 --- a/src/runtime/composables/visual-editing.ts +++ b/src/runtime/composables/visual-editing.ts @@ -159,10 +159,12 @@ export const useSanity = (client = 'default'): SanityHelper => { nuxtApp._sanity = nuxtApp._sanity || {} const $config = useRuntimeConfig() - const { additionalClients = {}, visualEditing, ...options } = defu( - $config.sanity, - $config.public.sanity, - ) + const { additionalClients = {}, visualEditing, ...options } = import.meta.client + ? $config.public.sanity + : defu( + $config.sanity, + $config.public.sanity, + ) if (client === 'default') { nuxtApp._sanity.default = createSanityHelper({