Skip to content
Snippets Groups Projects
Commit eb2975b6 authored by HJ's avatar HJ :fire:
Browse files

Merge branch 'fix-p-themes' into 'develop'

Fix p's weird corrupt theme data crashing theme engine

See merge request !1334
parents 28ebb8b0 272ba8f7
No related branches found
No related tags found
No related merge requests found
......@@ -242,9 +242,18 @@ export const generateShadows = (input, colors) => {
panelHeader: 'panel',
input: 'input'
}
const inputShadows = input.shadows && !input.themeEngineVersion
? shadows2to3(input.shadows, input.opacity)
: input.shadows || {}
const cleanInputShadows = Object.fromEntries(
Object.entries(input.shadows)
.map(([name, shadowSlot]) => [
name,
// defaulting color to black to avoid potential problems
shadowSlot.map(shadowDef => ({ color: '#000000', ...shadowDef }))
])
)
const inputShadows = cleanInputShadows && !input.themeEngineVersion
? shadows2to3(cleanInputShadows, input.opacity)
: cleanInputShadows || {}
const shadows = Object.entries({
...DEFAULT_SHADOWS,
...inputShadows
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment