We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f1999c commit 1dc22d3Copy full SHA for 1dc22d3
lib/main.js
@@ -207,7 +207,7 @@ function configDotenv (options) {
207
let encoding = 'utf8'
208
const debug = Boolean(options && options.debug)
209
210
- if (options?.encoding) {
+ if (options && options.encoding) {
211
encoding = options.encoding
212
} else {
213
if (debug) {
@@ -216,7 +216,7 @@ function configDotenv (options) {
216
}
217
218
let optionPathsThatExist = []
219
- if (options?.path) {
+ if (options && options.path) {
220
if (!Array.isArray(options.path)) {
221
if (fs.existsSync(options.path)) {
222
optionPathsThatExist = [_resolveHome(options.path)]
0 commit comments