diff options
author | Evan <[email protected]> | 2023-03-10 13:34:46 -0600 |
---|---|---|
committer | Evan <[email protected]> | 2023-03-10 13:34:46 -0600 |
commit | 4781c6e8d4d26c306021575093dc2b0fa029dc46 (patch) | |
tree | 3f1247c499bfab6c2195d20661d3b221c507c512 | |
parent | 27965be7ff0d4e492718fac4b3d4bfd48cc405ce (diff) | |
download | monkeytype-strict-equality.tar.gz monkeytype-strict-equality.zip |
Update misc.tsstrict-equality
-rw-r--r-- | frontend/src/ts/utils/misc.ts | 6 |
1 files 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; |