diff options
author | 2021-11-30 18:08:35 +0100 | |
---|---|---|
committer | 2021-11-30 18:08:35 +0100 | |
commit | dcc79879c2fab648ba87494dc3728d7005f756a6 (patch) | |
tree | 5e3a6a0b6b330d0e2643b2647e3626e7cfb728cd /source/features/quick-pr-diff-options.tsx | |
parent | afd2794e2645877a49efdc6251d58c18ea341311 (diff) | |
download | refined-github-dcc79879c2fab648ba87494dc3728d7005f756a6.tar.gz refined-github-dcc79879c2fab648ba87494dc3728d7005f756a6.tar.zst refined-github-dcc79879c2fab648ba87494dc3728d7005f756a6.zip |
Fix `quick-pr-diff-options` on GHE (#5127)
Co-authored-by: Scott Busche <swbusche@gmail.com>
Diffstat (limited to 'source/features/quick-pr-diff-options.tsx')
-rw-r--r-- | source/features/quick-pr-diff-options.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/features/quick-pr-diff-options.tsx b/source/features/quick-pr-diff-options.tsx index 81d2864f..9f6cbc46 100644 --- a/source/features/quick-pr-diff-options.tsx +++ b/source/features/quick-pr-diff-options.tsx @@ -74,10 +74,11 @@ function createWhitespaceButton(): HTMLElement { } function initPR(): false | void { - // TODO [2022-05-01]: Remove `.js-diff-settings` from the selector (kept for GHE) - const originalToggle = select('.js-diff-settings, [aria-label="Diff settings"]')!.closest('details')!.parentElement!; + const originalToggle = pageDetect.isEnterprise() + ? select('.js-diff-settings')!.closest('details')! // TODO [2022-05-01]: Remove GHE code + : select('[aria-label="Diff settings"]')!.closest('details')!.parentElement!; - if (!isHidingWhitespace()) { + if (!isHidingWhitespace() || pageDetect.isEnterprise()) { originalToggle.after( <div className="diffbar-item d-flex">{createWhitespaceButton()}</div>, ); |