Update elementsManager.js

This commit is contained in:
GGodPL 2023-08-01 22:50:09 +02:00 committed by GitHub
parent 0048a99dfc
commit 18980f8da8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -397,6 +397,8 @@ if (enabledMods.includes(mod)) {
}
const parseColor = (colorString) => {
// technically color arrays are handled differently, but ill add it just in case
if (colorString instanceof Array) return parseColor(colorString[0]);
if (typeof colorString != "string") return "#ffffff";
if (colorString.startsWith("rgb(")) {
const color = colorString.replace("rgb(", "").replace(")", "");