Skip to content

Commit 44b3031

Browse files
authored
Avoid generating empty statement in receiveI64ParamAsI53 (#21487)
Fixes a few Closure lint warnings. (Though of course there are very many other Closure warnings.)
1 parent 0b8b752 commit 44b3031

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/parseTools.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -904,14 +904,14 @@ function defineI64Param(name) {
904904

905905

906906
function receiveI64ParamAsI53(name, onError, handleErrors = true) {
907-
var errorHandler = handleErrors ? `if (isNaN(${name})) return ${onError}` : '';
907+
var errorHandler = handleErrors ? `if (isNaN(${name})) { return ${onError}; }` : '';
908908
if (WASM_BIGINT) {
909909
// Just convert the bigint into a double.
910-
return `${name} = bigintToI53Checked(${name});${errorHandler};`;
910+
return `${name} = bigintToI53Checked(${name});${errorHandler}`;
911911
}
912912
// Convert the high/low pair to a Number, checking for
913913
// overflow of the I53 range and returning onError in that case.
914-
return `var ${name} = convertI32PairToI53Checked(${name}_low, ${name}_high);${errorHandler};`;
914+
return `var ${name} = convertI32PairToI53Checked(${name}_low, ${name}_high);${errorHandler}`;
915915
}
916916

917917
function receiveI64ParamAsI53Unchecked(name) {

0 commit comments

Comments
 (0)