From 16c5d959ffbe729fe25da3bcf514e164679e47e7 Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Sat, 30 Sep 2023 01:01:31 -0600 Subject: [PATCH] fix: color retrieval --- src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 8ef7a39..0ce99a4 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -51,7 +51,7 @@ export function randomHexColour() { // From: https://www.geeksforgeeks.org/javas } export function getResourceColor(colorValue: string, vibrantValue: string) { - return colorValue === '&random' ? randomHexColour() : colorValue === '&vibrant' ? vibrantValue : colorValue; + return (!colorValue || colorValue === '&vibrant') ? vibrantValue : colorValue === '&random' ? randomHexColour() : colorValue; } export function formatTimestamp(timestamp: number, timeoffset: string) {