Fix function colors bug (#2919)
This commit is contained in:
parent
e86b586f4b
commit
33dcd44dbe
2 changed files with 5 additions and 0 deletions
|
|
@ -78,6 +78,7 @@ function validatePath(config, path, defaultValue) {
|
|||
!(
|
||||
typeof value === 'string' ||
|
||||
typeof value === 'number' ||
|
||||
typeof value === 'function' ||
|
||||
value instanceof String ||
|
||||
value instanceof Number ||
|
||||
Array.isArray(value)
|
||||
|
|
|
|||
|
|
@ -21,5 +21,9 @@ export default function transformThemeValue(themeSection) {
|
|||
return (value) => (Array.isArray(value) ? value.join(', ') : value)
|
||||
}
|
||||
|
||||
if (themeSection === 'colors') {
|
||||
return (value) => (typeof value === 'function' ? value({}) : value)
|
||||
}
|
||||
|
||||
return (value) => value
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue