Skip to content

Commit a90ae9a

Browse files
committed
Add key to macromapper, to ensure rerenders work on correct component
1 parent 85f9c60 commit a90ae9a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/components/_common/parsedHtml/ParsedHtml.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,13 @@ export const ParsedHtml = ({ htmlProps }: Props) => {
111111

112112
// Handle macros
113113
if (tag === processedHtmlMacroTag) {
114-
return <MacroMapper macros={macros} macroRef={attribs?.['data-macro-ref']} />;
114+
return (
115+
<MacroMapper
116+
key={attribs?.['data-macro-ref']}
117+
macros={macros}
118+
macroRef={attribs?.['data-macro-ref']}
119+
/>
120+
);
115121
}
116122

117123
// Remove img without src

0 commit comments

Comments
 (0)