We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ee5665 commit ff47915Copy full SHA for ff47915
lib/wasi.js
@@ -25,13 +25,11 @@ class WASI {
25
if (options === null || typeof options !== 'object')
26
throw new ERR_INVALID_ARG_TYPE('options', 'object', options);
27
28
- // eslint-disable-next-line prefer-const
29
- let { args, env, preopens } = options;
+ const { env, preopens } = options;
+ let { args = [] } = options;
30
31
if (ArrayIsArray(args))
32
args = ArrayPrototypeMap(args, (arg) => { return String(arg); });
33
- else if (args === undefined)
34
- args = [];
35
else
36
throw new ERR_INVALID_ARG_TYPE('options.args', 'Array', args);
37
0 commit comments