Skip to content

Commit 0f78bf1

Browse files
misc change
1 parent 010d1e2 commit 0f78bf1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/schema/int32.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,7 @@ SchemaInt32._defaultCaster = v => {
8989
const INT32_MIN = -0x80000000;
9090

9191
if (v != null) {
92-
if (typeof v !== 'number') {
93-
throw new Error();
94-
}
95-
if (v < INT32_MIN || v > INT32_MAX) {
92+
if (typeof v !== 'number' || v !== (v | 0) || v < INT32_MIN || v > INT32_MAX) {
9693
throw new Error();
9794
}
9895
}

0 commit comments

Comments
 (0)