diff options
author | 2021-03-01 05:31:58 -0500 | |
---|---|---|
committer | 2021-03-01 05:31:58 -0500 | |
commit | 41011ebabfde9fc1b44ab27fb321a04d5c0c13bd (patch) | |
tree | 496e0cfd8841f2a7c943bfae9c530774476deeda /source/features/embed-gist-inline.tsx | |
parent | 37989d034a14e53f4cc75646a4ecba800358a675 (diff) | |
download | refined-github-41011ebabfde9fc1b44ab27fb321a04d5c0c13bd.tar.gz refined-github-41011ebabfde9fc1b44ab27fb321a04d5c0c13bd.tar.zst refined-github-41011ebabfde9fc1b44ab27fb321a04d5c0c13bd.zip |
Update dependencies and lint (#4037)21.3.1
Co-authored-by: Federico <me@fregante.com>
Diffstat (limited to 'source/features/embed-gist-inline.tsx')
-rw-r--r-- | source/features/embed-gist-inline.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/features/embed-gist-inline.tsx b/source/features/embed-gist-inline.tsx index 808002a4..e272a3f5 100644 --- a/source/features/embed-gist-inline.tsx +++ b/source/features/embed-gist-inline.tsx @@ -51,9 +51,11 @@ async function embedGist(link: HTMLAnchorElement): Promise<void> { } function init(): void { - select.all('.js-comment-body p a:only-child') - .filter(item => isGist(item) && isOnlyChild(item)) - .forEach(embedGist); + for (const link of select.all('.js-comment-body p a:only-child')) { + if (isGist(link) && isOnlyChild(link)) { + void embedGist(link); + } + } } void features.add(__filebasename, { |