mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix: useLayout effect cleanup in dev mode for charts (#5505)
This commit is contained in:
parent
b00bd3d6c0
commit
46f5ce5ce0
1 changed files with 2 additions and 2 deletions
|
@ -46,7 +46,7 @@ const ChartPreviewBtn = (props: {
|
|||
},
|
||||
null, // files
|
||||
);
|
||||
|
||||
previewNode.replaceChildren();
|
||||
previewNode.appendChild(svg);
|
||||
|
||||
if (props.selected) {
|
||||
|
@ -55,7 +55,7 @@ const ChartPreviewBtn = (props: {
|
|||
})();
|
||||
|
||||
return () => {
|
||||
previewNode.removeChild(svg);
|
||||
previewNode.replaceChildren();
|
||||
};
|
||||
}, [props.spreadsheet, props.chartType, props.selected]);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue