Skip to content

Commit 1661728

Browse files
committed
Removed opt_returnCurrentIfNotFound parameter from getEditorForBlocklyWorkspace.
1 parent afcb85e commit 1661728

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/editor/editor.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)