File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export default function (Generator) {
1717 if ( methodName . length === 0 ) {
1818 methodName = 'procedure' ;
1919 }
20- let args = [ ] ;
20+ const args = [ ] ;
2121 const paramNamesIdsAndDefaults =
2222 Generator . currentTarget . blocks . getProcedureParamNamesIdsAndDefaults ( block . mutation . proccode ) ;
2323 if ( isCall ) {
@@ -33,7 +33,12 @@ export default function (Generator) {
3333 args . push ( Generator . nosToCode ( value ) ) ;
3434 }
3535 } else {
36- args = paramNamesIdsAndDefaults [ 0 ] ;
36+ for ( let i = 0 ; i < paramNamesIdsAndDefaults [ 0 ] . length ; i ++ ) {
37+ // Escape identity and Change first letter to lower case.
38+ let paramName = Generator . escapeVariableName ( paramNamesIdsAndDefaults [ 0 ] [ i ] ) ;
39+ paramName = paramName . replace ( / ^ [ A - Z ] / , firstLetter => firstLetter . toLowerCase ( ) ) ;
40+ args . push ( paramName ) ;
41+ }
3742 }
3843 const argsString = args . length > 0 ? `(${ args . join ( ', ' ) } )` : '' ;
3944 return `${ isCall ? '' : 'def self.' } ${ methodName } ${ argsString } \n` ;
You can’t perform that action at this time.
0 commit comments