Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
fix: color retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Moore committed Sep 30, 2023
1 parent 35e2e08 commit 16c5d95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 16c5d95

Please sign in to comment.