Skip to content

Commit

Permalink
replace 14 chaining operator
Browse files Browse the repository at this point in the history
  • Loading branch information
motdotla committed Feb 13, 2024
1 parent 9f1999c commit 1dc22d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/main.js
Expand Up @@ -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) {
Expand All @@ -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)]
Expand Down

0 comments on commit 1dc22d3

Please sign in to comment.