fix(Grist Node): Allow filtering for numbers <= 0 (#20045)

Co-authored-by: Shireen Missi <94372015+ShireenMissi@users.noreply.github.com>
This commit is contained in:
Ankit Kumar Ray 2025-10-03 23:47:18 +05:30 committed by GitHub
parent f1a51c486e
commit 96d3faf3ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,7 +68,8 @@ export function parseSortProperties(sortProperties: GristSortProperties) {
}
export function isSafeInteger(val: number) {
return !isNaN(val) && val > Number.MIN_VALUE && val < Number.MAX_VALUE;
//used MIN_SAFE_INTEGER and MAX_SAFE_INTEGER instead of MIN_VALUE and MAX_VALUE to avoid edge cases
return !isNaN(val) && val > Number.MIN_SAFE_INTEGER && val < Number.MAX_SAFE_INTEGER;
}
export function parseFilterProperties(filterProperties: GristFilterProperties) {