From bf2278ea3b5e7e5f55ef9e5f4bde7052c0f76d52 Mon Sep 17 00:00:00 2001 From: Sarah Rietkerk <49178322+srietkerk@users.noreply.github.com> Date: Thu, 6 Mar 2025 16:22:42 -0800 Subject: [PATCH] fix file download in download menu (#10408) --- webapp/src/editortoolbar.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/src/editortoolbar.tsx b/webapp/src/editortoolbar.tsx index 2e863b2f049b..0c3e195b2c00 100644 --- a/webapp/src/editortoolbar.tsx +++ b/webapp/src/editortoolbar.tsx @@ -196,11 +196,11 @@ export class EditorToolbar extends data.Component { + protected onFileDownloadClick = async () => { // Matching the tick in the call to compile() above for historical reasons pxt.tickEvent("editortools.download", { collapsed: this.getCollapsedState() }, { interactiveConsent: true }); pxt.tickEvent("editortools.downloadasfile", { collapsed: this.getCollapsedState() }, { interactiveConsent: true }); - (this.props.parent as ProjectView).compile(true); + await (this.props.parent as ProjectView).saveProjectToFileAsync(); } protected onPairClick = () => { @@ -344,7 +344,7 @@ export class EditorToolbar extends data.Component} {webUSBSupported && (packetioConnecting || packetioConnected) && } {boards && } - + {downloadHelp && } )