@rebasepro/client 0.6.0 → 0.6.1
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.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +4 -4
- package/src/transport.ts +2 -2
package/dist/index.es.js
CHANGED
|
@@ -87,7 +87,7 @@ function normalizeWhereValue(value) {
|
|
|
87
87
|
}
|
|
88
88
|
function serializeLogicalCondition(cond) {
|
|
89
89
|
if ("type" in cond) {
|
|
90
|
-
const sub = cond.conditions.map(serializeLogicalCondition).join(",");
|
|
90
|
+
const sub = (cond.conditions ?? []).map(serializeLogicalCondition).join(",");
|
|
91
91
|
return `${cond.type}(${sub})`;
|
|
92
92
|
} else {
|
|
93
93
|
const op = OP_MAP[cond.operator] ?? cond.operator;
|
|
@@ -108,7 +108,7 @@ function buildQueryString(params) {
|
|
|
108
108
|
if (params.include && params.include.length > 0) parts.push(`include=${encodeURIComponent(params.include.join(","))}`);
|
|
109
109
|
if (params.logical) {
|
|
110
110
|
const root = params.logical;
|
|
111
|
-
const serialized = root.conditions.map(serializeLogicalCondition).join(",");
|
|
111
|
+
const serialized = (root.conditions ?? []).map(serializeLogicalCondition).join(",");
|
|
112
112
|
parts.push(`${root.type}=${encodeURIComponent(`(${serialized})`)}`);
|
|
113
113
|
}
|
|
114
114
|
if (params.where) for (const [field, value] of Object.entries(params.where)) if (Array.isArray(value) && value.length > 0 && Array.isArray(value[0])) for (const subVal of value) {
|