Skip to content

Commit

Permalink
fix(colors): fixing colorsFromTheme function to avoid inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
mateoguzmana committed Aug 20, 2022
1 parent c26b66b commit efeebb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function colorsFromTheme(theme: string[], itemsToRender: number) {
const randomisedColors = shuffleArray(theme);

new Array(itemsToRender).fill(0).map((_, index) => {
if (index > randomisedColors.length) {
if (index >= randomisedColors.length) {
colorToPushIndex = 0;
} else {
colorToPushIndex = index;
Expand Down

0 comments on commit efeebb8

Please sign in to comment.