Merge branch 'less-null-color-error' into 'develop'

more resistant code for color parsing error

See merge request pleroma/pleroma-fe!1702
This commit is contained in:
HJ 2022-12-20 12:52:14 +00:00
commit 15eed4d8d2
1 changed files with 4 additions and 0 deletions

View File

@ -279,6 +279,9 @@ export default {
opacity
)
// Temporary patch for null-y value errors
if (layers.flat().some(v => v == null)) return acc
return {
...acc,
...textColors.reduce((acc, textColorKey) => {
@ -300,6 +303,7 @@ export default {
return Object.entries(ratios).reduce((acc, [k, v]) => { acc[k] = hints(v); return acc }, {})
} catch (e) {
console.warn('Failure computing contrasts', e)
return {}
}
},
previewRules () {