File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -572,7 +572,7 @@ export class Editor {
572572 throw new Error ( 'getMethodsFromMechanism: mechanism not found: ' + mechanism . className ) ;
573573 }
574574
575- public static getEditorForBlocklyWorkspace ( workspace : Blockly . Workspace , opt_returnCurrentIfNotFound ?: boolean ) : Editor | null {
575+ public static getEditorForBlocklyWorkspace ( workspace : Blockly . Workspace ) : Editor | null {
576576 if ( workspace . id in Editor . workspaceIdToEditor ) {
577577 return Editor . workspaceIdToEditor [ workspace . id ] ;
578578 }
@@ -585,7 +585,8 @@ export class Editor {
585585 return Editor . workspaceIdToEditor [ rootWorkspace . id ] ;
586586 }
587587
588- return opt_returnCurrentIfNotFound ? Editor . currentEditor : null ;
588+ console . error ( 'getEditorForBlocklyWorkspace: workspace with id ' + workspace . id + ' is not associated with an editor.' ) ;
589+ return null ;
589590 }
590591
591592 public static getEditorForBlocklyWorkspaceId ( workspaceId : string ) : Editor | null {
You can’t perform that action at this time.
0 commit comments