From 75da379079c320b688d053c139258745d5ba2097 Mon Sep 17 00:00:00 2001 From: Tom French Date: Thu, 28 Jul 2022 12:13:52 +0100 Subject: [PATCH] fix: use 64bit compatible integer check in aql compiler --- packages/loot-core/src/server/aql/compiler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/loot-core/src/server/aql/compiler.js b/packages/loot-core/src/server/aql/compiler.js index dfd4179..beacd52 100644 --- a/packages/loot-core/src/server/aql/compiler.js +++ b/packages/loot-core/src/server/aql/compiler.js @@ -456,7 +456,7 @@ function compileLiteral(value) { } else if (typeof value === 'boolean') { return typed(value ? 1 : 0, 'boolean', { literal: true }); } else if (typeof value === 'number') { - return typed(value, (value | 0) === value ? 'integer' : 'float', { + return typed(value, Number.isInteger(value) ? 'integer' : 'float', { literal: true }); } else if (Array.isArray(value)) {