Skip to content

Commit 98f8a88

Browse files
authored
fix(use-roadiz-page-title): siteName query (#607)
* fix: return null instead of empty vnode when tag is not defined * fix: use runtime-config outside the siteName computed to avoid error on runtime
1 parent e7897ea commit 98f8a88

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/composables/use-roadiz-page-title.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
export function useRoadizPageTitle(title?: MaybeRefOrGetter<string>) {
44
const commonContent = useCommonContent()
5-
const siteName = computed(() => commonContent.data.value?.head?.siteName || useRuntimeConfig().public.site.name)
5+
const runtimeConfig = useRuntimeConfig()
6+
const siteName = computed(() => commonContent.data.value?.head?.siteName || runtimeConfig?.public?.site?.name)
67

78
const { searchParamsLabel } = useCurrentPageSearchParams()
89

0 commit comments

Comments
 (0)