From a485386a3b07f831859fcefa9cd429fc801fd8eb Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Fri, 6 Mar 2020 21:48:40 +0200 Subject: [PATCH] fix tests --- src/services/theme_data/theme_data.service.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/services/theme_data/theme_data.service.js b/src/services/theme_data/theme_data.service.js index 4d7e4f67..dd87e3cf 100644 --- a/src/services/theme_data/theme_data.service.js +++ b/src/services/theme_data/theme_data.service.js @@ -384,12 +384,13 @@ export const getColors = (sourceColors, sourceOpacity) => SLOT_ORDERED.reduce(({ : (OPACITIES[opacitySlot] || {}).defaultValue ) } - if (Number.isNaN(outputColor.a)) { - outputColor.a = 1 - } } } + if (Number.isNaN(outputColor.a) || outputColor.a === undefined) { + outputColor.a = 1 + } + if (opacitySlot) { return { colors: { ...colors, [key]: outputColor },