logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/
commit: 1873c75a7fe068b80471544fbe114801a9cde658
parent 369ac726c0f40a6fd893e9b96f3ae1ad1886b885
Author: Henry Jameson <me@hjkos.com>
Date:   Tue, 29 Oct 2024 23:55:44 +0200

don't shit the bed if can't find a color

Diffstat:

Msrc/components/settings_modal/tabs/style_tab/style_tab.js11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/components/settings_modal/tabs/style_tab/style_tab.js b/src/components/settings_modal/tabs/style_tab/style_tab.js @@ -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 }