@budibase/frontend-core 1.2.42 → 1.2.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/utils/lucene.js +8 -3
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/frontend-core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.45",
|
|
4
4
|
"description": "Budibase frontend core libraries used in builder and client",
|
|
5
5
|
"author": "Budibase",
|
|
6
6
|
"license": "MPL-2.0",
|
|
7
7
|
"svelte": "src/index.js",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@budibase/bbui": "^1.2.
|
|
9
|
+
"@budibase/bbui": "^1.2.45",
|
|
10
10
|
"lodash": "^4.17.21",
|
|
11
11
|
"svelte": "^3.46.2"
|
|
12
12
|
},
|
|
13
|
-
"gitHead": "
|
|
13
|
+
"gitHead": "b390187ee3b142cc871552f596a7023abe69ef44"
|
|
14
14
|
}
|
package/src/utils/lucene.js
CHANGED
|
@@ -72,7 +72,7 @@ const cleanupQuery = query => {
|
|
|
72
72
|
continue
|
|
73
73
|
}
|
|
74
74
|
for (let [key, value] of Object.entries(query[filterField])) {
|
|
75
|
-
if (
|
|
75
|
+
if (value == null || value === "") {
|
|
76
76
|
delete query[filterField][key]
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -174,7 +174,7 @@ export const runLuceneQuery = (docs, query) => {
|
|
|
174
174
|
return docs
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
//
|
|
177
|
+
// Make query consistent first
|
|
178
178
|
query = cleanupQuery(query)
|
|
179
179
|
|
|
180
180
|
// Iterates over a set of filters and evaluates a fail function against a doc
|
|
@@ -206,7 +206,12 @@ export const runLuceneQuery = (docs, query) => {
|
|
|
206
206
|
|
|
207
207
|
// Process a range match
|
|
208
208
|
const rangeMatch = match("range", (docValue, testValue) => {
|
|
209
|
-
return
|
|
209
|
+
return (
|
|
210
|
+
docValue == null ||
|
|
211
|
+
docValue === "" ||
|
|
212
|
+
docValue < testValue.low ||
|
|
213
|
+
docValue > testValue.high
|
|
214
|
+
)
|
|
210
215
|
})
|
|
211
216
|
|
|
212
217
|
// Process an equal match (fails if the value is different)
|