summaryrefslogtreecommitdiff
path: root/source/features/patch-diff-links.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'source/features/patch-diff-links.tsx')
-rw-r--r--source/features/patch-diff-links.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/features/patch-diff-links.tsx b/source/features/patch-diff-links.tsx
index a20f66ed..7a114634 100644
--- a/source/features/patch-diff-links.tsx
+++ b/source/features/patch-diff-links.tsx
@@ -1,11 +1,11 @@
import React from 'dom-chef';
-import select from 'select-dom';
+import elementReady from 'element-ready';
import * as pageDetect from 'github-url-detection';
import features from '../feature-manager';
import {getCleanPathname} from '../github-helpers';
-function init(): void {
+async function init(): Promise<void> {
let commitUrl = '/' + getCleanPathname();
// Avoids a redirection
@@ -13,9 +13,9 @@ function init(): void {
commitUrl = commitUrl.replace(/\/pull\/\d+\/commits/, '/commit');
}
- const commitMeta = select('.commit-meta')!;
- commitMeta.classList.remove('no-wrap'); // #5987
- commitMeta.lastElementChild!.append(
+ const commitMeta = await elementReady('.commit-meta')!;
+ commitMeta!.classList.remove('no-wrap'); // #5987
+ commitMeta!.lastElementChild!.append(
<span className="sha-block" data-turbo="false">
<a href={`${commitUrl}.patch`} className="sha">patch</a>
{' '}