diff options
author | 2021-01-02 00:16:23 -0600 | |
---|---|---|
committer | 2021-01-02 00:16:23 -0600 | |
commit | 334f38f0f12ce88a73e61478ded54693146f6c04 (patch) | |
tree | a2a12b7816a3d70fb8f0afeaa082da7281f76173 /source/features/enable-file-links-in-compare-view.tsx | |
parent | 23f05c1abff354f49175eecb14f0b08fbe5c22e8 (diff) | |
download | refined-github-334f38f0f12ce88a73e61478ded54693146f6c04.tar.gz refined-github-334f38f0f12ce88a73e61478ded54693146f6c04.tar.zst refined-github-334f38f0f12ce88a73e61478ded54693146f6c04.zip |
Meta: Infer better types in `querySelector` and `select-dom` (#3831)
Diffstat (limited to 'source/features/enable-file-links-in-compare-view.tsx')
-rw-r--r-- | source/features/enable-file-links-in-compare-view.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/features/enable-file-links-in-compare-view.tsx b/source/features/enable-file-links-in-compare-view.tsx index 2775e7ef..1b374f2b 100644 --- a/source/features/enable-file-links-in-compare-view.tsx +++ b/source/features/enable-file-links-in-compare-view.tsx @@ -13,14 +13,14 @@ function handlePRMenuOpening({delegateTarget: dropdown}: delegate.Event): void { dropdown.classList.add('rgh-actionable-link'); // Mark this as processed const filePath = dropdown.closest('[data-path]')!.getAttribute('data-path')!; - const viewFile = select<HTMLAnchorElement>('[data-ga-click^="View file"]', dropdown)!; + const viewFile = select('a[data-ga-click^="View file"]', dropdown)!; viewFile.pathname = [getPRHeadRepo()!.nameWithOwner, 'blob', getCurrentBranch()!, filePath].join('/'); // Do not replace with `GitHubURL` #3152 #3111 #2595 } function handleCompareMenuOpening({delegateTarget: dropdown}: delegate.Event): void { dropdown.classList.add('rgh-actionable-link'); // Mark this as processed - const viewFile = select<HTMLAnchorElement>('[data-ga-click^="View file"]', dropdown)!; + const viewFile = select('a[data-ga-click^="View file"]', dropdown)!; const branch = select('[title^="compare"]')!.textContent!; viewFile.before( <div className="dropdown-header pl-5"> |