Skip to content

Commit 73d7b28

Browse files
authored
Fix isEmptyRepoRoot (#35)
1 parent 7d91bb9 commit 73d7b28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ collect.set('isRepo', [
247247
'https://github.com/sindresorhus/refined-github/issues/templates/edit', // Gotcha for isRepoIssueList
248248
]);
249249

250-
export const isEmptyRepoRoot = (): boolean => isRepoRoot() && exists('.blankslate');
250+
// On empty repos, there's only isRepoHome; this element is found in `<head>`
251+
export const isEmptyRepoRoot = (): boolean => isRepoHome() && !exists('link[rel="canonical"]');
251252

252253
export const isEmptyRepo = (): boolean => exists('[aria-label="Cannot fork because repository is empty."]');
253254

0 commit comments

Comments
 (0)