Skip to content

Commit 2342d72

Browse files
committed
Use existing parameter
1 parent 8ff2b59 commit 2342d72

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/util/resolveConfig.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import mergeWith from 'lodash/mergeWith'
22
import isFunction from 'lodash/isFunction'
33
import defaults from 'lodash/defaults'
44
import map from 'lodash/map'
5-
import get from 'lodash/get'
65

76
function resolveFunctionKeys(object) {
87
return Object.keys(object).reduce((resolved, key) => {
@@ -18,15 +17,15 @@ function without(object, key) {
1817
}
1918

2019
function mergeExtensions(theme) {
21-
return mergeWith({}, without(theme, 'extend'), theme.extend, (_, value, key) => {
20+
return mergeWith({}, without(theme, 'extend'), theme.extend, (_, extensions, key) => {
2221
return isFunction(theme[key])
2322
? mergedTheme => ({
2423
...theme[key](mergedTheme),
25-
...get(theme.extend, key, {})
24+
...extensions
2625
})
2726
: {
2827
...theme[key],
29-
...get(theme.extend, key, {}),
28+
...extensions,
3029
}
3130
})
3231
}

0 commit comments

Comments
 (0)