Skip to content

Commit

Permalink
chore: minor config refactor
Browse files Browse the repository at this point in the history
Removed a ternary and self-executing anonymous function to make the
code a little easier to scan.
  • Loading branch information
gjvis committed Oct 11, 2016
1 parent 0a801b1 commit 0100186
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ dotenv.config({
dotenvExpand(process.env);

const res = Object.assign({}, camelify(config), camelify(process.env));
res.caCert = (() => {return res.caCert ? fs.readFileSync(path.resolve(process.cwd(), res.caCert)) : undefined;})(),

if (res.caCert) {
res.caCert = fs.readFileSync(path.resolve(process.cwd(), res.caCert));
}

module.exports = res;

0 comments on commit 0100186

Please sign in to comment.