From 71f22aefa5889e0e4294737a1cd0aef27acdd088 Mon Sep 17 00:00:00 2001 From: softmarshmallow Date: Wed, 6 Oct 2021 15:00:34 +0900 Subject: [PATCH] fix copy code for react platform --- packages/app-design-to-code/code-screen.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app-design-to-code/code-screen.tsx b/packages/app-design-to-code/code-screen.tsx index 983a4bf3..59fccb8a 100644 --- a/packages/app-design-to-code/code-screen.tsx +++ b/packages/app-design-to-code/code-screen.tsx @@ -76,7 +76,7 @@ export function CodeScreen() { targetid={selection?.id} onGeneration={(app, src, vanilla_preview_source) => { setApp(app); - setSource(src); + setSource(src ?? app); // TODO: react only provides app. this needs to be fixed on the codegen side. handle_vanilla_preview_source(vanilla_preview_source); }} onAssetsLoad={(r) => {