Skip to content

Commit

Permalink
fix: get value from camelCase property
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrum committed Feb 20, 2018
1 parent 6d6f6bb commit 72e1f8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cfg-resolve.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import getCff from 'get-cff';
import toCamelCase from 'to-camel-case';
import pathExists from 'path-exists';
import deepAssign from 'deep-assign';

Expand All @@ -10,7 +11,7 @@ export default (flags = {}) => new Promise(async resolve => {
}

if (use) {
use = [].concat(use).reduce((cfg, key) => deepAssign(cfg, {[key]: flags[key] || {}}), {});
use = [].concat(use).reduce((cfg, key) => deepAssign(cfg, {[key]: flags[toCamelCase(key)] || {}}), {});
}

resolve(deepAssign({}, use || {}, config || {}));
Expand Down

0 comments on commit 72e1f8d

Please sign in to comment.