Skip to content

Commit 3a8c4ea

Browse files
committed
Fixes typos
1 parent 1bdb642 commit 3a8c4ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/blocks/mrc_mechanism_component_holder.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const MECHANISM = 'mechanism';
3232
export const COMPONENT = 'component';
3333

3434
type MechanismComponentHolderExtraState = {
35-
hideMechanims?: boolean;
35+
hideMechanisms?: boolean;
3636
}
3737

3838
type MechanismComponentHolderBlock = Blockly.Block & MechanismComponentHolderMixin;
@@ -57,15 +57,15 @@ const MECHANISM_COMPONENT_HOLDER = {
5757
const extraState: MechanismComponentHolderExtraState = {
5858
};
5959
if (this.mrcHideMechanisms == true) {
60-
extraState.hideMechanims = this.mrcHideMechanisms;
60+
extraState.hideMechanisms = this.mrcHideMechanisms;
6161
}
6262
return extraState;
6363
},
6464
/**
6565
* Applies the given state to this block.
6666
*/
6767
loadExtraState: function (this: MechanismComponentHolderBlock, extraState: MechanismComponentHolderExtraState): void {
68-
this.mrcHideMechanisms = (extraState.hideMechanims == undefined) ? 1 : extraState.hideMechanims;
68+
this.mrcHideMechanisms = (extraState.hideMechanisms == undefined) ? false : extraState.hideMechanisms;
6969
this.updateBlock_();
7070
},
7171
/**
@@ -78,7 +78,7 @@ const MECHANISM_COMPONENT_HOLDER = {
7878
}
7979
}
8080
else{
81-
if(!this.getInput('MECHANISMS')){
81+
if(this.getInput('MECHANISMS') == null){
8282
this.appendStatementInput('MECHANISMS').setCheck(MECHANISM_OUTPUT).appendField('Mechanisms');
8383
this.moveInputBefore('MECHANISMS', 'COMPONENTS')
8484
}

0 commit comments

Comments
 (0)