File tree Expand file tree Collapse file tree 2 files changed +0
-12
lines changed
Expand file tree Collapse file tree 2 files changed +0
-12
lines changed Original file line number Diff line number Diff line change @@ -623,10 +623,6 @@ export function getMethodNamesAlreadyOverriddenInWorkspace(
623623 * This function should only be called when upgrading old projects.
624624 */
625625export function upgrade_002_to_003 ( workspace : Blockly . Workspace ) : void {
626- // Make sure the workspace is headless.
627- if ( workspace . rendered ) {
628- throw new Error ( 'upgrade_002_to_003 should never be called with a rendered workspace.' ) ;
629- }
630626 workspace . getBlocksByType ( BLOCK_NAME ) . forEach ( block => {
631627 ( block as ClassMethodDefBlock ) . upgrade_002_to_003 ( ) ;
632628 } ) ;
@@ -637,10 +633,6 @@ export function upgrade_002_to_003(workspace: Blockly.Workspace): void {
637633 * This function should only be called when upgrading old projects.
638634 */
639635export function upgrade_004_to_005 ( workspace : Blockly . Workspace ) : void {
640- // Make sure the workspace is headless.
641- if ( workspace . rendered ) {
642- throw new Error ( 'upgrade_004_to_005 should never be called with a rendered workspace.' ) ;
643- }
644636 workspace . getBlocksByType ( BLOCK_NAME ) . forEach ( block => {
645637 ( block as ClassMethodDefBlock ) . upgrade_004_to_005 ( ) ;
646638 } ) ;
Original file line number Diff line number Diff line change @@ -526,10 +526,6 @@ export function mrcDescendantsMayHaveChanged(workspace: Blockly.Workspace): void
526526 * This function should only be called when upgrading old projects.
527527 */
528528export function upgrade_001_to_002 ( workspace : Blockly . Workspace ) {
529- // Make sure the workspace is headless.
530- if ( workspace . rendered ) {
531- throw new Error ( 'upgrade_001_to_002 should never be called with a rendered workspace.' ) ;
532- }
533529 // Make sure the module type is ROBOT.
534530 if ( getModuleTypeForWorkspace ( workspace ) !== storageModule . ModuleType . ROBOT ) {
535531 throw new Error ( 'upgrade_001_to_002 should only be called for a robot module.' ) ;
You can’t perform that action at this time.
0 commit comments