From b7ea220118fa29c0826b95d3678cda1a34769362 Mon Sep 17 00:00:00 2001 From: Mega-Volti <119437326+Mega-Volti@users.noreply.github.com> Date: Tue, 25 Jul 2023 19:29:51 +0200 Subject: [PATCH] Update resolvedicon.jsx - upper case color hex codes Update regular expression to also allow for upper case letters as part of the hex color code, as either are valid when describing an objects color. --- src/components/resolvedicon.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/resolvedicon.jsx b/src/components/resolvedicon.jsx index 76acf28b..dfd22ab2 100644 --- a/src/components/resolvedicon.jsx +++ b/src/components/resolvedicon.jsx @@ -41,7 +41,7 @@ export default function ResolvedIcon({ icon, width = 32, height = 32, alt = "log let iconColor; const suffix = icon.split("-")[icon.split("-").length - 1]; - if (!(suffix.match(`[#][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]`) == null)) { + if (!(suffix.match(`[#][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]`) == null)) { // set custom color code iconName = icon.replace(`${prefix}-`, "").replace(".svg", "").replace(`-${suffix}`, ""); iconColor = `${suffix}`;