mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-29 04:43:26 +01:00
Qualify CJS-only module imports
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { sample } from 'lodash';
|
||||
import lodash from 'lodash';
|
||||
import type { AvatarColorType } from '../types/Colors.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
|
||||
const { sample } = lodash;
|
||||
|
||||
export function getRandomColor(): AvatarColorType {
|
||||
return sample(AvatarColors) || AvatarColors[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user