summaryrefslogtreecommitdiff
path: root/source/libs/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'source/libs/utils.ts')
-rw-r--r--source/libs/utils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/libs/utils.ts b/source/libs/utils.ts
index dd2545a2..f7d5caaa 100644
--- a/source/libs/utils.ts
+++ b/source/libs/utils.ts
@@ -40,7 +40,7 @@ export const pluralize = (count: number, single: string, plural: string, zero?:
};
// Drops leading and trailing slash to avoid /\/?/ everywhere
-export const getCleanPathname = (): string => location.pathname.replace(/^[/]|[/]$/g, '');
+export const getCleanPathname = (): string => location.pathname.replace(/^\/|\/$/g, '');
// Parses a repo's subpage, e.g.
// '/user/repo/issues/' -> 'issues'