mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-10-05 15:30:06 +01:00
Enable tsconfig noUncheckedIndexedAccess
This commit is contained in:
1 parent
34b0f9cd50
commit
1d45a52da7
311 files changed
+2146
-1589
No files matched your search
@@ -12,8 +12,11 @@ export function getColorForCallLink(
|
||||
): AxoTokens.Avatar.ColorName {
|
||||
const rootKeyStart = rootKey.slice(0, 2);
|
||||
|
||||
const upper = (BASE_16_CONSONANT_ALPHABET.indexOf(rootKeyStart[0]) || 0) * 16;
|
||||
const lower = BASE_16_CONSONANT_ALPHABET.indexOf(rootKeyStart[1]) || 0;
|
||||
const upper =
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
(BASE_16_CONSONANT_ALPHABET.indexOf(rootKeyStart[0]!) || 0) * 16;
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
const lower = BASE_16_CONSONANT_ALPHABET.indexOf(rootKeyStart[1]!) || 0;
|
||||
const firstByte = upper + lower;
|
||||
|
||||
return AxoTokens.Avatar.getColorNameByHash(firstByte);
|
||||
|
||||
Reference in new issue
Block a user