diff options
Diffstat (limited to 'source/features/toggle-files-button.tsx')
-rw-r--r-- | source/features/toggle-files-button.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/features/toggle-files-button.tsx b/source/features/toggle-files-button.tsx index 46fdfa82..5be12df0 100644 --- a/source/features/toggle-files-button.tsx +++ b/source/features/toggle-files-button.tsx @@ -8,6 +8,7 @@ import * as pageDetect from 'github-url-detection'; import {FoldIcon, UnfoldIcon, ArrowUpIcon} from '@primer/octicons-react'; import features from '.'; +import selectHas from '../helpers/select-has'; import attachElement from '../helpers/attach-element'; import observeElement from '../helpers/simplified-element-observer'; @@ -21,7 +22,7 @@ const noticeStyle = {paddingRight: '19px'}; function addButton(): void { attachElement({ - anchor: select('.repository-content .octicon-history')?.closest('ul'), + anchor: selectHas('.repository-content ul:has(.octicon-history)')!, allowMissingAnchor: true, className: toggleButtonClass, position: 'append', |