fix: use 64bit compatible integer check in aql compiler

This commit is contained in:
Tom French 2022-07-28 12:13:52 +01:00 committed by James Long
parent 423f355766
commit 75da379079

View file

@ -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)) {