Skip to content

Commit

Permalink
fix: remove disable-eslint comment
Browse files Browse the repository at this point in the history
  • Loading branch information
BartoszGrajdek committed Mar 4, 2024
1 parent 5cf88db commit a64a2cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/web/parserUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ function parseText(
if (!!text && text !== '\n') {
const dom = parseRangesToHTMLNodes(text, markdownRanges, markdownStyle);

// eslint-disable-next-line es/no-optional-chaining
if ((targetElement.firstChild as HTMLElement | null)?.innerHTML !== dom.innerHTML) {
const rootSpan = targetElement.firstChild as HTMLElement | null;
if (!rootSpan || rootSpan.innerHTML !== dom.innerHTML) {
targetElement.innerHTML = '';
targetElement.innerText = '';
target.appendChild(dom);
Expand Down

0 comments on commit a64a2cf

Please sign in to comment.