Skip to content

Commit

Permalink
chore: Set limit to number of permutations (#3126)
Browse files Browse the repository at this point in the history
  • Loading branch information
jperals authored Dec 12, 2024
1 parent 31c3798 commit 85cb377
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pages/utils/permutations-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ function formatValue(key: string, value: any) {
return value;
}

const maximumPermutations = 276;

export default function PermutationsView<T>({ permutations, render }: PermutationsViewProps<T>) {
if (permutations.length > maximumPermutations) {
throw new Error(`Too many permutations (${permutations.length}), maximum is ${maximumPermutations}`);
}

return (
<SpaceBetween size="m">
{permutations.map((permutation, index) => {
Expand Down

0 comments on commit 85cb377

Please sign in to comment.