@rkmodules/rules 0.0.63 → 0.0.65

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.cjs.js CHANGED
@@ -296,7 +296,7 @@ function nAryOnTreeBranch(trees, fn) {
296
296
  var maxPaths = paths.filter(function (_, i) { return allKeys[i].length === maxBranches; });
297
297
  var path = maxPaths[0];
298
298
  var newBranch = fn(branches, paths);
299
- if (newBranch === null || newBranch === void 0 ? void 0 : newBranch.length) {
299
+ if (newBranch !== DISCARD) {
300
300
  result[path] = newBranch;
301
301
  }
302
302
  };
@@ -323,8 +323,6 @@ function nAryOnTreeBranch(trees, fn) {
323
323
  function nAryOnTree(trees, fn, fill) {
324
324
  return nAryOnTreeBranch(trees, function nAryOnTreeCallback(branches, paths) {
325
325
  var maxLength = Math.max.apply(Math, __spreadArray([], __read(branches.map(function (b) { return b.length; })), false));
326
- if (maxLength === 0)
327
- return; // Skip empty branches
328
326
  var results = [];
329
327
  var _loop_3 = function (i) {
330
328
  var items = branches.map(function (b) {
@@ -560,7 +558,10 @@ var getValue = {
560
558
  paths = toArray(inputs.path || {});
561
559
  tree = mapTree(inputs.tree, function (value) {
562
560
  // get the property from the object
563
- return getValue$1(value, paths[0]);
561
+ var val = getValue$1(value, paths[0]);
562
+ if (val === undefined)
563
+ return DISCARD;
564
+ return val;
564
565
  });
565
566
  return [2 /*return*/, { tree: tree }];
566
567
  });