From 10dd6750f9a86c1e97e55997d598bc4238e34d87 Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Fri, 4 Dec 2020 20:53:16 +0800 Subject: [PATCH] refactor(wasi): prefer nullish coalescing (denoland/deno#8607) --- wasi/snapshot_preview1.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wasi/snapshot_preview1.ts b/wasi/snapshot_preview1.ts index 30756fe829c2..98850fc1f252 100644 --- a/wasi/snapshot_preview1.ts +++ b/wasi/snapshot_preview1.ts @@ -296,8 +296,8 @@ export default class Context { exports: Record; constructor(options: ContextOptions) { - this.args = options.args ? options.args : []; - this.env = options.env ? options.env : {}; + this.args = options.args ?? []; + this.env = options.env ?? {}; this.exitOnReturn = options.exitOnReturn ?? true; this.memory = null!;