Skip to content

Commit b6516da

Browse files
committed
fix: handle owner/repository in cluster data
1 parent 4e78a33 commit b6516da

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/pages/[owner]/[repo]/index.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,17 @@ const openState = reactive<Record<string, boolean>>({})
149149
class="text-xs relative md:absolute md:mt-6 text-gray-400 mb-1"
150150
>
151151
<NuxtLink
152-
v-if="issue.repository"
152+
v-if="issue.owner && issue.repository"
153153
class="no-underline hover:underline color-current"
154154
:to="{
155155
name: 'owner-repo',
156156
params: {
157-
owner: issue.repository.split('/')[0],
158-
repo: issue.repository.split('/')[1],
157+
owner: issue.owner,
158+
repo: issue.repository,
159159
},
160160
}"
161161
>
162-
{{ issue.repository }}
162+
{{ issue.owner }}/{{ issue.repository }}
163163
</NuxtLink>
164164
&middot;
165165
updated

server/api/clusters/[owner]/[repo].get.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default defineCachedEventHandler(async (event) => {
2727
return clusters
2828
.map(cluster => cluster.map(i => ({
2929
owner: i.owner,
30-
repository: i.repository.split,
30+
repository: i.repository,
3131
number: i.number,
3232
title: i.title,
3333
url: i.url,

0 commit comments

Comments
 (0)