Skip to content

Commit 56d78dd

Browse files
authored
Merge pull request #2143 from navikt/video-rerender-error
Add key to macromapper, to ensure rerenders work on correct component
2 parents 85f9c60 + a90ae9a commit 56d78dd

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)