Skip to content

Commit e8346ca

Browse files
committed
Addressed review comments
1 parent 2c19451 commit e8346ca

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

src/blocks/mrc_class_method_def.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ interface ClassMethodDefMixin extends ClassMethodDefMixinType {
6262
}
6363
type ClassMethodDefMixinType = typeof CLASS_METHOD_DEF;
6464

65-
/** Extra state for serialising call_python_* blocks. */
65+
/** Extra state for serialising mrc_class_method_def blocks. */
6666
type ClassMethodDefExtraState = {
6767
/**
6868
* The id that identifies this method definition.

src/blocks/mrc_steps.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@ import { BLOCK_NAME as MRC_JUMP_TO_STEP } from './mrc_jump_to_step';
2929
import * as stepContainer from './mrc_step_container'
3030

3131
export const BLOCK_NAME = 'mrc_steps';
32-
// const MUTATOR_BLOCK_NAME = 'steps_mutatorarg';
3332

34-
35-
/** Extra state for serialising call_python_* blocks. */
33+
/** Extra state for serialising mrc_steps blocks. */
3634
type StepsExtraState = {
3735
/**
3836
* The steps
@@ -223,8 +221,10 @@ const STEPS = {
223221
const shadowBlock = this.workspace.newBlock('logic_boolean') as Blockly.BlockSvg;
224222
shadowBlock.setShadow(true);
225223
shadowBlock.setFieldValue('TRUE', 'BOOL');
226-
shadowBlock.initSvg();
227-
shadowBlock.render();
224+
if (this.workspace.rendered){
225+
shadowBlock.initSvg();
226+
shadowBlock.render();
227+
}
228228
conditionInput.connection?.connect(shadowBlock.outputConnection!);
229229
}
230230
}

src/storage/upgrade_project.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@ export async function upgradeProjectIfNecessary(
4848
// Intentional fallthrough
4949
// @ts-ignore
5050
case '0.0.2':
51-
upgradeFrom_002_to_003(storage, projectName, projectInfo);
52-
// Intentional fallthrough
53-
// @ts-ignore
51+
upgradeFrom_002_to_003(storage, projectName, projectInfo);
5452
case '0.0.3':
5553
upgradeFrom_003_to_004(storage, projectName, projectInfo);
54+
break;
5655
default:
5756
throw new Error('Unrecognized project version: ' + projectInfo.version);
5857

0 commit comments

Comments
 (0)