Skip to content

Commit f343089

Browse files
committed
Fix creating configuration files over live
1 parent 47d6321 commit f343089

File tree

1 file changed

+2
-1
lines changed
  • packages/app/src/app/overmind/namespaces/files

1 file changed

+2
-1
lines changed

packages/app/src/app/overmind/namespaces/files/actions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,7 @@ export const moduleCreated: AsyncAction<{
691691
actions.editor.internal.setCurrentModule(module);
692692

693693
try {
694+
const savedCode = module.code;
694695
const updatedModule = await effects.api.createModule(sandbox.id, module);
695696

696697
module.id = updatedModule.id;
@@ -709,7 +710,7 @@ export const moduleCreated: AsyncAction<{
709710
// Update server with latest data
710711
effects.live.sendCodeUpdate(
711712
module.shortid,
712-
getTextOperation('', module.code)
713+
getTextOperation(savedCode || '', module.code)
713714
);
714715
}
715716
} catch (error) {

0 commit comments

Comments
 (0)