summaryrefslogtreecommitdiff
path: root/source/github-helpers/api.ts
diff options
context:
space:
mode:
Diffstat (limited to 'source/github-helpers/api.ts')
-rw-r--r--source/github-helpers/api.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/github-helpers/api.ts b/source/github-helpers/api.ts
index 504e4755..56efbea1 100644
--- a/source/github-helpers/api.ts
+++ b/source/github-helpers/api.ts
@@ -114,7 +114,7 @@ export const v3 = mem(async (
const {personalToken} = await settings;
if (!query.startsWith('https')) {
- query = query.startsWith('/') ? query.slice(1) : 'repos/' + getRepo()!.nameWithOwner + '/' + query;
+ query = query.startsWith('/') ? query.slice(1) : ['repos', getRepo()!.nameWithOwner, query].filter(Boolean).join('/');
}
const url = new URL(query, api3);