Skip to content

Commit 1dc22d3

Browse files
committed
replace 14 chaining operator
1 parent 9f1999c commit 1dc22d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ function configDotenv (options) {
207207
let encoding = 'utf8'
208208
const debug = Boolean(options && options.debug)
209209

210-
if (options?.encoding) {
210+
if (options && options.encoding) {
211211
encoding = options.encoding
212212
} else {
213213
if (debug) {
@@ -216,7 +216,7 @@ function configDotenv (options) {
216216
}
217217

218218
let optionPathsThatExist = []
219-
if (options?.path) {
219+
if (options && options.path) {
220220
if (!Array.isArray(options.path)) {
221221
if (fs.existsSync(options.path)) {
222222
optionPathsThatExist = [_resolveHome(options.path)]

0 commit comments

Comments
 (0)