fix(colors): correctly flatten color closures
This commit is contained in:
parent
c16bf207bc
commit
0206d060e5
1 changed files with 1 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ import _ from 'lodash'
|
|||
export default function flattenColorPalette(colors) {
|
||||
const result = _(colors)
|
||||
.flatMap((color, name) => {
|
||||
if (!_.isObject(color)) {
|
||||
if (_.isFunction(color) || !_.isObject(color)) {
|
||||
return [[name, color]]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue