From c752f56d0b7711e9a815468a19e440363a6dcf02 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 23 Jan 2020 22:26:49 +0200 Subject: [PATCH] v l1 compatibility --- src/components/style_switcher/style_switcher.js | 2 +- src/services/style_setter/style_setter.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/style_switcher/style_switcher.js b/src/components/style_switcher/style_switcher.js index 59ec1bf512..14da4f8031 100644 --- a/src/components/style_switcher/style_switcher.js +++ b/src/components/style_switcher/style_switcher.js @@ -590,7 +590,7 @@ export default { const shadows = input.shadows || {} const fonts = input.fonts || {} const colors = !input.themeEngineVersion - ? colors2to3(input.colors) + ? colors2to3(input.colors || input) : input.colors || input if (version === 0) { diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js index 7f9f17be04..533145d47a 100644 --- a/src/services/style_setter/style_setter.js +++ b/src/services/style_setter/style_setter.js @@ -111,7 +111,7 @@ const getCssShadowFilter = (input) => { export const generateColors = (themeData) => { const sourceColors = !themeData.themeEngineVersion - ? colors2to3(themeData.colors) + ? colors2to3(themeData.colors || themeData) : themeData.colors || themeData const isLightOnDark = convert(sourceColors.bg).hsl.l < convert(sourceColors.text).hsl.l @@ -285,7 +285,7 @@ export const DEFAULT_SHADOWS = { }] } export const generateShadows = (input, colors, mod) => { - const inputShadows = !input.themeEngineVersion + const inputShadows = input.shadows && !input.themeEngineVersion ? shadows2to3(input.shadows) : input.shadows || {} const shadows = Object.entries({