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