mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fix colors.length modulus
This commit is contained in:
parent
69a84278e5
commit
68794bf184
1 changed files with 1 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ type FallbackImageProps = {
|
|||
|
||||
export const FallbackImage = (props: FallbackImageProps): JSX.Element => {
|
||||
console.log('checking title: ', props.title)
|
||||
const idx = (Math.abs(hashCode(props.title)) % Colors.length) - 1
|
||||
const idx = Math.abs(hashCode(props.title)) % (Colors.length - 1)
|
||||
console.log('title', props.title, 'idx: ', idx)
|
||||
const color = Colors[idx]
|
||||
console.log('color:', color)
|
||||
|
|
|
|||
Loading…
Reference in a new issue