Compare commits
2 commits
ca57af0a43
...
ba0855ad64
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba0855ad64 | ||
|
|
1873c75a7f |
1 changed files with 8 additions and 3 deletions
|
|
@ -523,9 +523,14 @@ export default {
|
|||
})
|
||||
|
||||
exports.computeColor = (color) => {
|
||||
const computedColor = findColor(color, { dynamicVars: dynamicVars.value, staticVars: staticVars.value })
|
||||
if (computedColor) {
|
||||
return rgb2hex(computedColor)
|
||||
let computedColor
|
||||
try {
|
||||
computedColor = findColor(color, { dynamicVars: dynamicVars.value, staticVars: staticVars.value })
|
||||
if (computedColor) {
|
||||
return rgb2hex(computedColor)
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn(e)
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue