From 0206d060e5233d095703fb5c0c6595fbb82b5a55 Mon Sep 17 00:00:00 2001 From: Enzo Innocenzi Date: Tue, 18 Aug 2020 22:35:10 +0200 Subject: [PATCH] fix(colors): correctly flatten color closures --- src/util/flattenColorPalette.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/flattenColorPalette.js b/src/util/flattenColorPalette.js index 3214d58d7..5110e988d 100644 --- a/src/util/flattenColorPalette.js +++ b/src/util/flattenColorPalette.js @@ -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]] }