File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,14 +164,14 @@ function BlocklyEditor({ name }: BlocklyEditorProps) {
164164 /**
165165 * saveEditor
166166 */
167- function saveEditor ( ) {
167+ async function saveEditor ( ) {
168168 const ws = EditorMgr . getInstance ( ) . getEditorSession ( name ) ?. workspace ;
169169 if ( ws ) {
170170 const activeTab = localStorage . getItem ( StorageKeys . ACTIVETAB ) ?. replace ( / ^ " | " $ / g, '' ) ;
171171 if ( activeTab === name ) {
172172 const code = blocklyToPython ( ws ) ;
173173 console . log ( 'Saving blockly' , activeTab , code ) ;
174- EditorMgr . getInstance ( ) . saveEditor ( name , code ) ;
174+ await EditorMgr . getInstance ( ) . saveEditor ( name , code ) ;
175175 EditorMgr . getInstance ( ) . SaveToLocalStorage (
176176 EditorMgr . getInstance ( ) . getEditorSession ( name ) as EditorSession ,
177177 code
Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ export default class EditorMgr {
281281 path : session . path ,
282282 gpath : session . gpath ,
283283 isBlockly : session . type === EditorType . BLOCKLY ,
284- isSavedToXRP : session . isModified ,
284+ isSavedToXRP : ! session . isModified ,
285285 content : code ,
286286 } ;
287287 // Update the session content with the new code
You can’t perform that action at this time.
0 commit comments