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) {
17
17
if ( methodName . length === 0 ) {
18
18
methodName = 'procedure' ;
19
19
}
20
- let args = [ ] ;
20
+ const args = [ ] ;
21
21
const paramNamesIdsAndDefaults =
22
22
Generator . currentTarget . blocks . getProcedureParamNamesIdsAndDefaults ( block . mutation . proccode ) ;
23
23
if ( isCall ) {
@@ -33,7 +33,12 @@ export default function (Generator) {
33
33
args . push ( Generator . nosToCode ( value ) ) ;
34
34
}
35
35
} 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
+ }
37
42
}
38
43
const argsString = args . length > 0 ? `(${ args . join ( ', ' ) } )` : '' ;
39
44
return `${ isCall ? '' : 'def self.' } ${ methodName } ${ argsString } \n` ;
You can’t perform that action at this time.
0 commit comments