From 4781c6e8d4d26c306021575093dc2b0fa029dc46 Mon Sep 17 00:00:00 2001 From: Evan Date: Fri, 10 Mar 2023 13:34:46 -0600 Subject: Update misc.ts --- frontend/src/ts/utils/misc.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/ts/utils/misc.ts b/frontend/src/ts/utils/misc.ts index b66fe5662..936b42c07 100644 --- a/frontend/src/ts/utils/misc.ts +++ b/frontend/src/ts/utils/misc.ts @@ -271,17 +271,17 @@ function hexToRgb(hex: string): b: number; } | undefined { - if (hex.length != 4 && hex.length != 7 && !hex.startsWith("#")) { + if (hex.length !== 4 && hex.length !== 7 && !hex.startsWith("#")) { return undefined; } let r: number; let g: number; let b: number; - if (hex.length == 4) { + if (hex.length === 4) { r = ("0x" + hex[1] + hex[1]) as unknown as number; g = ("0x" + hex[2] + hex[2]) as unknown as number; b = ("0x" + hex[3] + hex[3]) as unknown as number; - } else if (hex.length == 7) { + } else if (hex.length === 7) { r = ("0x" + hex[1] + hex[2]) as unknown as number; g = ("0x" + hex[3] + hex[4]) as unknown as number; b = ("0x" + hex[5] + hex[6]) as unknown as number; -- cgit v1.2.3