From b914499a90a779025254b62e2562cbd7869e410d Mon Sep 17 00:00:00 2001
From: Federico Brigante <me@fregante.com>
Date: Mon, 16 Oct 2023 19:49:57 +0800
Subject: Fix `textContent` types (#6983)

---
 source/features/embed-gist-inline.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(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 f84653cf..c7cc24e1 100644
--- a/source/features/embed-gist-inline.tsx
+++ b/source/features/embed-gist-inline.tsx
@@ -36,7 +36,7 @@ function isGist(link: HTMLAnchorElement): boolean {
 	return parseGistLink(link)?.replace(/[^/]/g, '').length === 1; // Exclude user links and file links
 }
 
-const isOnlyChild = (link: HTMLAnchorElement): boolean => link.textContent!.trim() === link.parentNode!.textContent!.trim();
+const isOnlyChild = (link: HTMLAnchorElement): boolean => link.textContent.trim() === link.parentElement!.textContent.trim();
 
 async function embedGist(link: HTMLAnchorElement): Promise<void> {
 	const info = <em> (loading)</em>;
-- 
cgit v1.2.3

