Allow currentUserId to be null when calculating user colour (#22830)

GitOrigin-RevId: 70ef0c5a7319fa952690b5e23fae7aef9703eed9
This commit is contained in:
Alf Eaton
2025-01-13 11:17:01 +00:00
committed by Copybot
parent cffa9c1a28
commit 19ee929d65

View File

@@ -5,7 +5,7 @@ const OWN_HUE = 200 // We will always appear as this color to ourselves
const OWN_HUE_BLOCKED_SIZE = 20 // no other user should have a HUE in this range
const TOTAL_HUES = 360 // actually 361, but 360 for legacy reasons
export function getHueForUserId(userId: string, currentUserId: string) {
export function getHueForUserId(userId: string, currentUserId: string | null) {
if (userId == null || userId === 'anonymous-user') {
return ANONYMOUS_HUE
}