diff options
author | 2020-03-16 23:48:51 +0100 | |
---|---|---|
committer | 2020-03-16 23:48:51 +0100 | |
commit | 5fd1601d4e5784360386d61c4410ab1d39d36106 (patch) | |
tree | 6efb22281449c6a3aa604510e731ceb9cc8ba10c /source/libs/utils.ts | |
parent | 16f3d165c107f9ee68ea48e2581c3aa4b10b0824 (diff) | |
download | refined-github-5fd1601d4e5784360386d61c4410ab1d39d36106.tar.gz refined-github-5fd1601d4e5784360386d61c4410ab1d39d36106.tar.zst refined-github-5fd1601d4e5784360386d61c4410ab1d39d36106.zip |
Meta, updates, lint (#2899)
Diffstat (limited to 'source/libs/utils.ts')
-rw-r--r-- | source/libs/utils.ts | 2 |
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' |