diff --git a/packages/web/components/patterns/LibraryCards/FallbackImage.tsx b/packages/web/components/patterns/LibraryCards/FallbackImage.tsx index 28574bb9f..8cdc64aaa 100644 --- a/packages/web/components/patterns/LibraryCards/FallbackImage.tsx +++ b/packages/web/components/patterns/LibraryCards/FallbackImage.tsx @@ -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)