logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 15eed4d8d2790403c1ab653b8b20b95c3d6b641b
parent 10fb8efddfd7a67e388777cba00cdbac317da59b
Author: HJ <30-hj@users.noreply.git.pleroma.social>
Date:   Tue, 20 Dec 2022 12:52:14 +0000

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

more resistant code for color parsing error

See merge request pleroma/pleroma-fe!1702

Diffstat:

Msrc/components/settings_modal/tabs/theme_tab/theme_tab.js4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.js b/src/components/settings_modal/tabs/theme_tab/theme_tab.js @@ -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 () {