Skip to content

Commit

Permalink
fix(bindgen): Only specify options if defined
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed Mar 1, 2023
1 parent 8495e23 commit c7cefb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bindgen/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ function typescriptBindings(outputDir, buildDir, wasmBinaries, options, forNode=
return
}
const camel = camelCase(parameter.name)
functionContent += ` if (options.${camel}) {\n`
functionContent += ` if (typeof options.${camel} !== "undefined") {\n`
if (parameter.type === "BOOL") {
functionContent += ` args.push('--${parameter.name}')\n`
} else {
Expand Down

0 comments on commit c7cefb2

Please sign in to comment.