add fallback colors for color functions in case of error

This commit is contained in:
SethBurkart123
2024-04-07 16:30:57 +10:00
parent 5fb66eb304
commit 22b3666cf0
3 changed files with 6 additions and 1 deletions
+1
View File
@@ -1556,6 +1556,7 @@ function CheckCurrentLesson(lesson: any, num: number) {
}
export function GetThresholdOfColor(color: any) {
if (!color) return 0
// Case-insensitive regular expression for matching RGBA colors
const rgbaRegex = /rgba?\(([^)]+)\)/gi