From b066e5621900a4625bc3722a9af04d1d3f2f1233 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Tue, 7 Jan 2025 12:06:28 +0100 Subject: [PATCH] refactor: change return type of renderToCanvas cleanup function to async --- code/renderers/react/src/renderToCanvas.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/renderers/react/src/renderToCanvas.tsx b/code/renderers/react/src/renderToCanvas.tsx index 2b40f3f47dd2..57c1086cee1b 100644 --- a/code/renderers/react/src/renderToCanvas.tsx +++ b/code/renderers/react/src/renderToCanvas.tsx @@ -112,8 +112,8 @@ export async function renderToCanvas( processActQueue(); }); - return () => { - act(() => { + return async () => { + await act(() => { unmountElement(canvasElement); }); };