fix: use integer check which doesn't require value to be 32 bit

This commit is contained in:
Tom French 2022-07-27 20:19:11 +01:00 committed by James Long
parent 6075e846d3
commit f1b61cf6f1

View file

@ -42,7 +42,7 @@ export function convertInputType(value, type) {
}
return value;
case 'integer':
if (typeof value === 'number' && (value | 0) === value) {
if (typeof value === 'number' && Number.isInteger(value)) {
return value;
} else {
throw new Error("Can't convert to integer: " + JSON.stringify(value));