Skip to content

fix(use-roadiz-page-title): siteName query - #607

Merged
manuelodelain merged 6 commits into
rezozero:mainfrom
willybrauner:fix/site-name-query
Jun 19, 2026
Merged

fix(use-roadiz-page-title): siteName query#607
manuelodelain merged 6 commits into
rezozero:mainfrom
willybrauner:fix/site-name-query

Conversation

@willybrauner

@willybrauner willybrauner commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Initially, if the first query commonContent.data.value?.head?.siteName return undefined, we tried to get the siteName via useRuntimeConfig().public.site.name which occur this error:

ℹ Error: [nuxt] A composable that requires access to the Nuxt instance was called outside of a plugin, Nuxt hook, Nuxt middleware, or Vue setup function. This is probably not a Nuxt bug. Find out more at https://nuxt.com/docs/4.x/guide/concepts/auto-imports#vue-and-nuxt-composables.

Composables like useRuntimeConfig() require access to the Nuxt app instance, which is only available during the synchronous execution of a Vue setup() function, not in a computed, that is "Lazy". (For more information about the lazy evaluation of the computed function: https://willybrauner.com/journal/signal-the-push-pull-based-algorithm ;))

So we just have to declare useRuntimeConfig outside the computed.

@manuelodelain
manuelodelain merged commit 98f8a88 into rezozero:main Jun 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants