Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Commit 00684e4

Browse files
author
Hans Kristian Flaatten
committed
Correctly parse float values in custom functions
1 parent 600bec3 commit 00684e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.litcoffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
bbox = bbox.split ','
1818
1919
if bbox.length is 4
20-
val = parseFloat(val) for val in bbox
20+
bbox[key] = parseFloat(val) for val, key in bbox
2121
2222
res[field] = $geoWithin: $geometry:
2323
type: 'Polygon'
@@ -36,7 +36,7 @@
3636
input = input.split ','
3737
3838
if input.length is 2
39-
val = parseFloat(val) for val in input
39+
input[key] = parseFloat(val) for val, key in input
4040
4141
query[field] = $near: $geometry:
4242
type: 'Point'

0 commit comments

Comments
 (0)