Skip to content

Commit 7ac2fe1

Browse files
committed
fix(search): handle tables that contain floats and bigints
1 parent 75c1517 commit 7ac2fe1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/services/search-builder.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ function SearchBuilder(model, opts, params, fieldNamesRequested) {
152152

153153
if (!Number.isNaN(value)) {
154154
if (Number.isInteger(value) && !Number.isSafeInteger(value)) {
155-
value = BigInt(params.search);
155+
// NOTE: Numbers higher than MAX_SAFE_INTEGER need to be handled as
156+
// strings to circumvent precision problems
157+
value = params.search;
156158
}
157159

158160
condition[field.field] = value;

0 commit comments

Comments
 (0)