fix: use integer check which doesn't require value to be 32 bit
This commit is contained in:
parent
12289792da
commit
423f355766
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ export function convertInputType(value, type) {
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
case 'integer':
|
case 'integer':
|
||||||
if (typeof value === 'number' && (value | 0) === value) {
|
if (typeof value === 'number' && Number.isInteger(value)) {
|
||||||
return value;
|
return value;
|
||||||
} else {
|
} else {
|
||||||
throw new Error("Can't convert to integer: " + JSON.stringify(value));
|
throw new Error("Can't convert to integer: " + JSON.stringify(value));
|
||||||
|
|
Loading…
Reference in a new issue