GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — wasi: refactor destructuring object on constructor · nodejs/node@ff47915

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • wasi.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/wasi.js‎

Copy file name to clipboardExpand all lines: lib/wasi.js
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@ class WASI {
2525
if (options === null || typeof options !== 'object')
2626
throw new ERR_INVALID_ARG_TYPE('options', 'object', options);
2727

28-
// eslint-disable-next-line prefer-const
29-
let { args, env, preopens } = options;
28+
const { env, preopens } = options;
29+
let { args = [] } = options;
3030

3131
if (ArrayIsArray(args))
3232
args = ArrayPrototypeMap(args, (arg) => { return String(arg); });
33-
else if (args === undefined)
34-
args = [];
3533
else
3634
throw new ERR_INVALID_ARG_TYPE('options.args', 'Array', args);
3735

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.