summaryrefslogtreecommitdiff
path: root/source/features/embed-gist-inline.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'source/features/embed-gist-inline.tsx')
-rw-r--r--source/features/embed-gist-inline.tsx8
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, {