File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export const MECHANISM = 'mechanism';
3232export const COMPONENT = 'component' ;
3333
3434type MechanismComponentHolderExtraState = {
35- hideMechanims ?: boolean ;
35+ hideMechanisms ?: boolean ;
3636}
3737
3838type 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 }
You can’t perform that action at this time.
0 commit comments