mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-18 23:49:20 +01:00
Enable tsconfig noUncheckedIndexedAccess
This commit is contained in:
@@ -8,5 +8,6 @@ import { AvatarColors } from '../types/Colors.std.js';
|
||||
const { sample } = lodash;
|
||||
|
||||
export function getRandomColor(): AvatarColorType {
|
||||
return sample(AvatarColors) || AvatarColors[0];
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
return sample(AvatarColors) || AvatarColors[0]!;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user