File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ const links = computed(() => [
88 ' target' : ' _blank' ,
99 ' aria-label' : ` ${key } social link ` ,
1010 })),
11- appConfig .github ? .url && {
11+ appConfig .github && appConfig . github .url && {
1212 ' icon' : ' i-simple-icons-github' ,
1313 ' to' : appConfig .github .url ,
1414 ' target' : ' _blank' ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ const site = useSiteConfig()
66
77const { localePath, isEnabled, locales } = useDocusI18n ()
88
9- const links = computed (() => appConfig .github ? .url
9+ const links = computed (() => appConfig .github && appConfig . github .url
1010 ? [
1111 {
1212 ' icon' : ' i-simple-icons-github' ,
Original file line number Diff line number Diff line change @@ -46,16 +46,18 @@ defineOgImageComponent('Docs', {
4646 headline: headline .value ,
4747})
4848
49+ const github = computed (() => appConfig .github ? appConfig .github : null );
50+
4951const editLink = computed (() => {
50- if (! appConfig . github ) {
52+ if (! github . value ) {
5153 return
5254 }
5355
5456 return [
55- appConfig . github .url ,
57+ github . value .url ,
5658 ' edit' ,
57- appConfig . github .branch ,
58- appConfig . github .rootDir ,
59+ github . value .branch ,
60+ github . value .rootDir ,
5961 ' content' ,
6062 ` ${page .value ?.stem }.${page .value ?.extension } ` ,
6163 ].filter (Boolean ).join (' /' )
@@ -92,7 +94,7 @@ const editLink = computed(() => {
9294
9395 <USeparator >
9496 <div
95- v-if =" editLink "
97+ v-if =" github "
9698 class =" flex items-center gap-2 text-sm text-muted"
9799 >
98100 <UButton
@@ -109,7 +111,7 @@ const editLink = computed(() => {
109111 <UButton
110112 variant =" link"
111113 color =" neutral"
112- :to =" `${appConfig. github.url}/issues/new/choose`"
114+ :to =" `${github.url}/issues/new/choose`"
113115 target =" _blank"
114116 icon =" i-lucide-alert-circle"
115117 :ui =" { leadingIcon: 'size-4' }"
You can’t perform that action at this time.
0 commit comments