don't shit the bed if can't find a color
This commit is contained in:
parent
369ac726c0
commit
1873c75a7f
|
@ -523,10 +523,15 @@ export default {
|
||||||
})
|
})
|
||||||
|
|
||||||
exports.computeColor = (color) => {
|
exports.computeColor = (color) => {
|
||||||
const computedColor = findColor(color, { dynamicVars: dynamicVars.value, staticVars: staticVars.value })
|
let computedColor
|
||||||
|
try {
|
||||||
|
computedColor = findColor(color, { dynamicVars: dynamicVars.value, staticVars: staticVars.value })
|
||||||
if (computedColor) {
|
if (computedColor) {
|
||||||
return rgb2hex(computedColor)
|
return rgb2hex(computedColor)
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.warn(e)
|
||||||
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
provide('computeColor', exports.computeColor)
|
provide('computeColor', exports.computeColor)
|
||||||
|
|
Loading…
Reference in a new issue