From 423f355766198f0b0502051c489c56707292c7f0 Mon Sep 17 00:00:00 2001 From: Tom French Date: Wed, 27 Jul 2022 20:19:11 +0100 Subject: [PATCH] fix: use integer check which doesn't require value to be 32 bit --- packages/loot-core/src/server/aql/schema-helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/loot-core/src/server/aql/schema-helpers.js b/packages/loot-core/src/server/aql/schema-helpers.js index ef48c5f..b9afc3b 100644 --- a/packages/loot-core/src/server/aql/schema-helpers.js +++ b/packages/loot-core/src/server/aql/schema-helpers.js @@ -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));