diff options
author | 2023-10-16 19:49:57 +0800 | |
---|---|---|
committer | 2023-10-16 19:49:57 +0800 | |
commit | b914499a90a779025254b62e2562cbd7869e410d (patch) | |
tree | c8f98c62393cc8cb528832fecdaf1b6019dca818 /source/features/embed-gist-inline.tsx | |
parent | ba686ec428909508e4b8191f0d011be3e9c354c8 (diff) | |
download | refined-github-b914499a90a779025254b62e2562cbd7869e410d.tar.gz refined-github-b914499a90a779025254b62e2562cbd7869e410d.tar.zst refined-github-b914499a90a779025254b62e2562cbd7869e410d.zip |
Fix `textContent` types (#6983)
Diffstat (limited to 'source/features/embed-gist-inline.tsx')
-rw-r--r-- | source/features/embed-gist-inline.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
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>; |