File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,10 @@ const CLASS_METHOD_DEF = {
193193 }
194194 this . mrcUpdateParams ( ) ;
195195 if ( this . mrcCanBeCalledWithinClass ) {
196- mutateMethodCallers ( this . workspace , this . id , this . getMethodForWithin ( ) ) ;
196+ const methodForWithin = this . getMethodForWithin ( ) ;
197+ if ( methodForWithin ) {
198+ mutateMethodCallers ( this . workspace , this . id , methodForWithin ) ;
199+ }
197200 }
198201 } ,
199202 decompose : function ( this : ClassMethodDefBlock , workspace : Blockly . Workspace ) {
@@ -267,15 +270,15 @@ const CLASS_METHOD_DEF = {
267270 const method = {
268271 blockId : this . id ,
269272 visibleName : this . getFieldValue ( FIELD_METHOD_NAME ) ,
270- pythonName : this . mrcFuncName ,
273+ pythonName : this . mrcFuncName ? this . mrcFuncName : '' ,
271274 returnType : this . mrcReturnType ,
272275 args : [ {
273276 name : 'self' ,
274277 type : '' ,
275278 } ] ,
276279 } ;
277280 if ( ! method . pythonName ) {
278- method . pythonName = method . visibleName ;
281+ method . pythonName = method . visibleName as string ;
279282 }
280283 this . mrcParameters . forEach ( param => {
281284 method . args . push ( {
You can’t perform that action at this time.
0 commit comments