From 47df5a8b52c9578b1efac853d6b240e8416fd341 Mon Sep 17 00:00:00 2001 From: Roland Date: Fri, 28 Mar 2025 10:26:54 -0600 Subject: [PATCH] Handling when saved tags do not have a color. --- app/src/components/Common.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/components/Common.js b/app/src/components/Common.js index 25ed0648..ff73dbba 100644 --- a/app/src/components/Common.js +++ b/app/src/components/Common.js @@ -1897,6 +1897,9 @@ export function mergeDeep(target, source) { export function getDistinctColor(hexColors) { function hexToHSL(hex) { + if (!hex) { + return {h: 0, s: 0, l: 0}; + } let r = parseInt(hex.slice(1, 3), 16) / 255; let g = parseInt(hex.slice(3, 5), 16) / 255; let b = parseInt(hex.slice(5, 7), 16) / 255;