From cf3d51db40b9f3e4a4a101b80bdceaaa22af47b0 Mon Sep 17 00:00:00 2001 From: saschabuehrle Date: Sun, 22 Mar 2026 10:37:35 +0100 Subject: [PATCH] fix: await autosave before downloading sketch zip (fixes #4021) --- client/modules/IDE/hooks/useSketchActions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/modules/IDE/hooks/useSketchActions.js b/client/modules/IDE/hooks/useSketchActions.js index a4c5d70235..dc8a9970cc 100644 --- a/client/modules/IDE/hooks/useSketchActions.js +++ b/client/modules/IDE/hooks/useSketchActions.js @@ -40,9 +40,9 @@ const useSketchActions = () => { } } - function downloadSketch() { + async function downloadSketch() { if (authenticated && user.id === project.owner.id) { - dispatch(autosaveProject()); + await dispatch(autosaveProject()); exportProjectAsZip(project.id); } }