Skip to content

Commit f40a8c3

Browse files
authored
Merge pull request #812 from motdotla/patch-12
patch issue with node 12
2 parents 06fd9bb + 1dc22d3 commit f40a8c3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [14.x, 16.x, 18.x, 20.x]
15+
node-version: [12.x, 14.x, 16.x, 18.x, 20.x]
1616

1717
steps:
1818
- uses: actions/checkout@v3

lib/main.js

+2-2
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)