Skip to content

Commit e12e89f

Browse files
Update src/lib/validators.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent 0de9862 commit e12e89f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/lib/validators.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ export const validateUserIdentifier = (input: UserIdentifier) => {
121121
}
122122
};
123123

124-
export const validatePaginationParam = (param: number, errorMessage) => {
125-
if (param < 0) {
124+
export const validatePaginationParam = (param: number, errorMessage: string) => {
125+
if (!Number.isFinite(param) || param < 0) {
126126
throw new JunoValidationError(errorMessage);
127127
}
128128
};

0 commit comments

Comments
 (0)