@monolith-forensics/monolith-ui 1.3.38 → 1.3.39

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.
@@ -249,11 +249,12 @@ const Rules = ({ rules = [], combinator, showCombinator, filterDefinitions, onDe
249
249
  const prevValue = rule.value;
250
250
  let newValue;
251
251
  const isBetween = operator.value.toLowerCase().includes("between");
252
- if (!isBetween) {
253
- newValue = !!(prevValue === null || prevValue === void 0 ? void 0 : prevValue[0]) ? [prevValue[0]] : undefined;
252
+ if (isBetween) {
253
+ newValue = [(prevValue === null || prevValue === void 0 ? void 0 : prevValue[0]) || "", (prevValue === null || prevValue === void 0 ? void 0 : prevValue[1]) || ""];
254
254
  }
255
255
  else {
256
- newValue = [(prevValue === null || prevValue === void 0 ? void 0 : prevValue[0]) || "", (prevValue === null || prevValue === void 0 ? void 0 : prevValue[1]) || ""];
256
+ newValue =
257
+ (prevValue === null || prevValue === void 0 ? void 0 : prevValue.length) && prevValue.length > 0 ? prevValue : undefined; // keep existing value if it exists, return undefined if array is empty
257
258
  }
258
259
  onUpdate(Object.assign(Object.assign({}, rule), { operator, value: newValue }));
259
260
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monolith-forensics/monolith-ui",
3
- "version": "1.3.38",
3
+ "version": "1.3.39",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Matt Danner (Monolith Forensics LLC)",