From 51e7f751c74c57845d58abbe7b73c8ef57585a4a Mon Sep 17 00:00:00 2001 From: LiviaMedeiros Date: Sat, 21 May 2022 17:57:20 +0800 Subject: [PATCH] wasi: use `kEmptyObject` PR-URL: https://github.com/nodejs/node/pull/43159 Reviewed-By: Matteo Collina Reviewed-By: Antoine du Hamel --- lib/wasi.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/wasi.js b/lib/wasi.js index 43ecf94b4cb..7093953a007 100644 --- a/lib/wasi.js +++ b/lib/wasi.js @@ -13,7 +13,10 @@ const { ERR_INVALID_ARG_TYPE, ERR_WASI_ALREADY_STARTED } = require('internal/errors').codes; -const { emitExperimentalWarning } = require('internal/util'); +const { + emitExperimentalWarning, + kEmptyObject, +} = require('internal/util'); const { isArrayBuffer } = require('internal/util/types'); const { validateArray, @@ -55,7 +58,7 @@ function setupInstance(self, instance) { } class WASI { - constructor(options = {}) { + constructor(options = kEmptyObject) { validateObject(options, 'options'); if (options.args !== undefined)