Skip to content

Commit 1db9bbd

Browse files
committed
Remove trailing comma from Fn layout for functions with no input parameters
1 parent 0220133 commit 1db9bbd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/jsm/transpiler/TSLEncoder.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,8 @@ ${ this.tab }}`;
798798

799799
if ( node.layout !== false && hasPointer === false ) {
800800

801-
funcStr += ', { ' + inputs.join( ', ' ) + ', return: \'' + type + '\' }';
801+
const inputsStr = inputs.length > 0 ? inputs.join( ', ' ) + ', ' : '';
802+
funcStr += ', { ' + inputsStr + 'return: \'' + type + '\' }';
802803

803804
}
804805

0 commit comments

Comments
 (0)