summaryrefslogtreecommitdiff
path: root/source/features/quick-pr-diff-options.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'source/features/quick-pr-diff-options.tsx')
-rw-r--r--source/features/quick-pr-diff-options.tsx7
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>,
);