From 41011ebabfde9fc1b44ab27fb321a04d5c0c13bd Mon Sep 17 00:00:00 2001 From: yakov116 <16872793+yakov116@users.noreply.github.com> Date: Mon, 1 Mar 2021 05:31:58 -0500 Subject: Update dependencies and lint (#4037) Co-authored-by: Federico --- source/features/embed-gist-inline.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/features/embed-gist-inline.tsx') 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 { } 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, { -- cgit v1.2.3