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