Skip to content

Commit e2045d7

Browse files
committed
Fix renderer utils
1 parent 34c4090 commit e2045d7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/web/src/renderer/utils.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Please see LICENSE files in the repository root for full details.
66
*/
77

88
import { type JSX } from "react";
9-
import { type DOMNode, Element, type HTMLReactParserOptions, type Text } from "html-react-parser";
9+
import { type DOMNode, type Element, type HTMLReactParserOptions, type Text } from "html-react-parser";
1010
import { type MatrixEvent, type Room } from "matrix-js-sdk/src/matrix";
1111

1212
/**
@@ -89,7 +89,7 @@ export const combineRenderers =
8989
if (result) return result;
9090
}
9191
}
92-
if (node instanceof Element) {
92+
if (node.type === "tag") {
9393
const tagName = node.tagName.toLowerCase() as keyof HTMLElementTagNameMap;
9494
for (const replacer of renderers) {
9595
const result = replacer[tagName]?.(node, parametersWithReplace, index);

0 commit comments

Comments
 (0)