Skip to content

Commit 8314b03

Browse files
authored
Fix some console errors (#2061)
1 parent 70f6604 commit 8314b03

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

source/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const isRepo = (): boolean => /^[^/]+\/[^/]+/.test(getCleanPathname()) &&
7878
!isRepoSearch();
7979

8080
export const isRepoDiscussionList = (): boolean =>
81-
/^(issues|pulls)($|\/$|\/(?!\d+))/.test(getRepoPath()!) || // `issues/bfred-it` is a list but `issues/1` isn't
81+
/^(issues|pulls)($|\/$|\/(?!\d+|new))/.test(getRepoPath()!) || // `issues/bfred-it` is a list but `issues/1` isn't
8282
/^labels\/.+/.test(getRepoPath()!);
8383

8484
export const isRepoRoot = (): boolean => /^(tree[/][^/]+)?$/.test(getRepoPath()!);

test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ test('isRepoDiscussionList', urlMatcherMacro, pageDetect.isRepoDiscussionList, [
161161
], [
162162
'http://github.com/sindresorhus/ava',
163163
'https://github.com',
164+
'https://github.com/sindresorhus/refined-github/issues/new',
164165
'https://github.com/sindresorhus/refined-github/issues/170',
165166
'https://github.com/sindresorhus/refined-github/pull/148',
166167
'http://github.com/sindresorhus/issues',

0 commit comments

Comments
 (0)