Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Use exact inequality
Browse files Browse the repository at this point in the history
Co-authored-by: Travis Ralston <travpc@gmail.com>
  • Loading branch information
Johennes and turt2live authored May 2, 2022
1 parent 5da4ab8 commit f90805f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HtmlUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ export function tooltipifyLinks(rootNodes: ArrayLike<Element>, ignoredNodes: Ele
continue;
}

if (node.tagName === "A" && node.getAttribute("href") && node.getAttribute("href") != node.textContent.trim()) {
if (node.tagName === "A" && node.getAttribute("href") && node.getAttribute("href") !== node.textContent.trim()) {
const href = node.getAttribute("href");
const tooltip = <TextWithTooltip tooltip={getAbsoluteUrl(href)}>
<span dangerouslySetInnerHTML={{ __html: node.innerHTML }} />
Expand Down

0 comments on commit f90805f

Please sign in to comment.