mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
fix: add maybeMainDomain getter which do not error out
This commit is contained in:
parent
1f1dac1792
commit
c17da2c93e
2 changed files with 3 additions and 2 deletions
|
@ -161,6 +161,7 @@ export function useDomains(domain_?: MaybeRefOrGetter<string>) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
maybeMainDomain: mainDomain,
|
||||||
mainDomain: computed(() => {
|
mainDomain: computed(() => {
|
||||||
if (!mainDomain.value) throw new Error(getNoDataMessage('mainDomain'))
|
if (!mainDomain.value) throw new Error(getNoDataMessage('mainDomain'))
|
||||||
return mainDomain.value
|
return mainDomain.value
|
||||||
|
|
|
@ -24,9 +24,9 @@ export const useInfos = createGlobalState(() => {
|
||||||
const routerKey = ref<string | undefined>()
|
const routerKey = ref<string | undefined>()
|
||||||
const breadcrumb = ref<CustomRoute[]>([])
|
const breadcrumb = ref<CustomRoute[]>([])
|
||||||
|
|
||||||
const { mainDomain } = useDomains()
|
const { maybeMainDomain } = useDomains()
|
||||||
const ssoLink = computed(() => {
|
const ssoLink = computed(() => {
|
||||||
return `//${mainDomain.value ?? host.value}/yunohost/sso`
|
return `//${maybeMainDomain.value ?? host.value}/yunohost/sso`
|
||||||
})
|
})
|
||||||
|
|
||||||
// INIT
|
// INIT
|
||||||
|
|
Loading…
Add table
Reference in a new issue