summaryrefslogtreecommitdiff
path: root/source/github-helpers/api.ts
diff options
context:
space:
mode:
authorGravatar cheap glitch <cheap.glitch@gmail.com> 2020-12-09 15:01:07 +0100
committerGravatar GitHub <noreply@github.com> 2020-12-09 09:01:07 -0500
commit4d958628ac65b80aff72f51f4ed1b59b132e1522 (patch)
tree9b875b913ec1ad26bc05c8f542b20cc21f457524 /source/github-helpers/api.ts
parentac5d9b4b7b4ec7ac15dd283414d8ffd512de8bf3 (diff)
downloadrefined-github-4d958628ac65b80aff72f51f4ed1b59b132e1522.tar.gz
refined-github-4d958628ac65b80aff72f51f4ed1b59b132e1522.tar.zst
refined-github-4d958628ac65b80aff72f51f4ed1b59b132e1522.zip
Fix `new-repo-disable-projects-and-wiki` feature (#3794)
Co-authored-by: Federico <me@fregante.com>
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);