inibase 1.5.1 → 1.5.3
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/dist/index.js +2 -0
- package/dist/utils.server.js +1 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1048,6 +1048,8 @@ export default class Inibase {
|
|
|
1048
1048
|
: ["=", v])
|
|
1049
1049
|
.filter(Boolean);
|
|
1050
1050
|
searchOperator = crit.map((c) => c[0]);
|
|
1051
|
+
if (searchOperator.length === 1)
|
|
1052
|
+
searchOperator = searchOperator[0];
|
|
1051
1053
|
searchComparedAtValue = crit.map((c) => c[1]);
|
|
1052
1054
|
searchLogicalOperator = "or";
|
|
1053
1055
|
}
|
package/dist/utils.server.js
CHANGED
|
@@ -95,8 +95,7 @@ export const compare = (operator, originalValue, comparedValue, fieldType) => {
|
|
|
95
95
|
// Special handling when the original value is an array.
|
|
96
96
|
if (Array.isArray(originalValue) &&
|
|
97
97
|
!Array.isArray(comparedValue) &&
|
|
98
|
-
!["[]", "![]"].includes(operator)
|
|
99
|
-
fieldType !== "array")
|
|
98
|
+
!["[]", "![]"].includes(operator))
|
|
100
99
|
return originalValue.some((value) => compare(operator, value, comparedValue, fieldType));
|
|
101
100
|
// Switch statement for different comparison operators.
|
|
102
101
|
switch (operator) {
|