Skip to content

Commit

Permalink
Fix get parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
simonepri committed Dec 23, 2018
1 parent d07c8a1 commit 2b393ad
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ function get(path, defaultValue, opts) {
if (!opts || !opts.caseSensitive) {
dotp = dotp.toLowerCase();
}

const val = process.env[key];
const val = parse(process.env[key], opts);
if (dotp === '') {
obj = val;
} else {
Expand All @@ -152,9 +151,9 @@ function get(path, defaultValue, opts) {
prefix = prefix.toLowerCase();
}
if (path === '') {
return parse(obj, opts);
return obj;
}
return parse(dotProp.get(obj, prefix, defaultValue), opts);
return dotProp.get(obj, prefix, defaultValue);
}

/**
Expand Down

0 comments on commit 2b393ad

Please sign in to comment.