Skip to content

Commit

Permalink
check length
Browse files Browse the repository at this point in the history
  • Loading branch information
gsteenkamp89 committed Apr 15, 2024
1 parent cbeee0d commit 66b74ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/plugins/oSnap/utils/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ function validateMaybeArray(
validateInput(value as string, typesMaybeArray)
);
} else {
if (valuesMaybeArray.length !== typesMaybeArray.length) {
throw new Error("Types and values don't match");
}
// handle array of arrays
return valuesMaybeArray.map(
(value: MaybeNestedArrays<string>, index: number) =>
Expand Down

0 comments on commit 66b74ef

Please sign in to comment.