File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -397,8 +397,12 @@ TEST: addTests('isRepo', [
397397export const hasRepoHeader = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => isRepo ( url ) && ! isRepoSearch ( url ) ;
398398TEST: addTests ( 'hasRepoHeader' , combinedTestOnly ) ;
399399
400- // On empty repos, there's only isRepoHome; this element is found in `<head>`
401- export const isEmptyRepoRoot = ( ) : boolean => isRepoHome ( ) && ! exists ( 'link[rel="canonical"]' ) ;
400+ export const isEmptyRepoRoot = ( ) : boolean => isRepoHome ( ) && exists ( [
401+ // If you don't have write access
402+ '.blankslate-icon' ,
403+ // If you have write access
404+ '#empty-setup-clone-url' ,
405+ ] . join ( ',' ) ) ;
402406
403407export const isEmptyRepo = ( ) : boolean => exists ( '[aria-label="Cannot fork because repository is empty."]' ) ;
404408
You can’t perform that action at this time.
0 commit comments