From 1dc22d312fc641c9384fcec4b8181d089e37de8c Mon Sep 17 00:00:00 2001 From: Scott Motte Date: Tue, 13 Feb 2024 09:41:49 -0800 Subject: [PATCH] replace 14 chaining operator --- lib/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/main.js b/lib/main.js index a7b6aeb9..1a99afdf 100644 --- a/lib/main.js +++ b/lib/main.js @@ -207,7 +207,7 @@ function configDotenv (options) { let encoding = 'utf8' const debug = Boolean(options && options.debug) - if (options?.encoding) { + if (options && options.encoding) { encoding = options.encoding } else { if (debug) { @@ -216,7 +216,7 @@ function configDotenv (options) { } let optionPathsThatExist = [] - if (options?.path) { + if (options && options.path) { if (!Array.isArray(options.path)) { if (fs.existsSync(options.path)) { optionPathsThatExist = [_resolveHome(options.path)]