Defer unwrapping config until actually evaluating the config() function
This commit is contained in:
parent
74fc46adb7
commit
df8d80fbbf
1 changed files with 1 additions and 2 deletions
|
|
@ -2,11 +2,10 @@ import _ from 'lodash'
|
|||
import functions from 'postcss-functions'
|
||||
|
||||
export default function(config) {
|
||||
const options = config()
|
||||
|
||||
return functions({
|
||||
functions: {
|
||||
config: (path, defaultValue) => {
|
||||
const options = config()
|
||||
return _.get(options, _.trim(path, `'"`), defaultValue)
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue