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 f1b61cf6f1
commit 4421f2a173

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