@player-ui/check-path-plugin 0.13.0 → 0.14.0-next.0

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.
@@ -1454,22 +1454,6 @@ var CheckPathPlugin = function() {
1454
1454
  }
1455
1455
  });
1456
1456
  };
1457
- var unpackNode = function unpackNode(item) {
1458
- var _item_children_, _item_children, _item_children_1, _item_children1;
1459
- var unpacked = [];
1460
- if ("children" in item && ((_item_children = item.children) === null || _item_children === void 0 ? void 0 : (_item_children_ = _item_children[0]) === null || _item_children_ === void 0 ? void 0 : _item_children_.value.type) === "asset" && ((_item_children1 = item.children) === null || _item_children1 === void 0 ? void 0 : (_item_children_1 = _item_children1[0]) === null || _item_children_1 === void 0 ? void 0 : _item_children_1.value).children) {
1461
- var _item_children__value_children_, _item_children__value_children, _item_children_2, _item_children2;
1462
- if (((_item_children__value_children = ((_item_children2 = item.children) === null || _item_children2 === void 0 ? void 0 : (_item_children_2 = _item_children2[0]) === null || _item_children_2 === void 0 ? void 0 : _item_children_2.value).children) === null || _item_children__value_children === void 0 ? void 0 : (_item_children__value_children_ = _item_children__value_children[0]) === null || _item_children__value_children_ === void 0 ? void 0 : _item_children__value_children_.value.type) === "multi-node") {
1463
- var _item_children__value_children_1, _item_children__value_children1, _item_children_3, _item_children3;
1464
- ((_item_children__value_children1 = ((_item_children3 = item.children) === null || _item_children3 === void 0 ? void 0 : (_item_children_3 = _item_children3[0]) === null || _item_children_3 === void 0 ? void 0 : _item_children_3.value).children) === null || _item_children__value_children1 === void 0 ? void 0 : (_item_children__value_children_1 = _item_children__value_children1[0]) === null || _item_children__value_children_1 === void 0 ? void 0 : _item_children__value_children_1.value).values.forEach(function(value) {
1465
- unpacked.push(value);
1466
- });
1467
- }
1468
- } else {
1469
- unpacked.push(item);
1470
- }
1471
- return unpacked;
1472
- };
1473
1457
  var hasSomethingToResolve = function hasSomethingToResolve(str) {
1474
1458
  return bindingResolveLookup(str) || expressionResolveLookup(str);
1475
1459
  };
@@ -2751,6 +2735,7 @@ var CheckPathPlugin = function() {
2751
2735
  }
2752
2736
  };
2753
2737
  var identifier = function() {
2738
+ var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
2754
2739
  if (!isIdentifierChar(ch)) {
2755
2740
  return;
2756
2741
  }
@@ -2761,6 +2746,14 @@ var CheckPathPlugin = function() {
2761
2746
  }
2762
2747
  value += ch;
2763
2748
  }
2749
+ if (allowBoolValue) {
2750
+ if (value === "true") {
2751
+ return toValue(true);
2752
+ }
2753
+ if (value === "false") {
2754
+ return toValue(false);
2755
+ }
2756
+ }
2764
2757
  if (value) {
2765
2758
  var maybeNumber = Number(value);
2766
2759
  value = isNaN(maybeNumber) ? value : maybeNumber;
@@ -2809,8 +2802,9 @@ var CheckPathPlugin = function() {
2809
2802
  }
2810
2803
  };
2811
2804
  var simpleSegment = function() {
2805
+ var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
2812
2806
  var _nestedPath, _ref;
2813
- return (_ref = (_nestedPath = nestedPath()) !== null && _nestedPath !== void 0 ? _nestedPath : expression()) !== null && _ref !== void 0 ? _ref : identifier();
2807
+ return (_ref = (_nestedPath = nestedPath()) !== null && _nestedPath !== void 0 ? _nestedPath : expression()) !== null && _ref !== void 0 ? _ref : identifier(allowBoolValue);
2814
2808
  };
2815
2809
  var segment = function() {
2816
2810
  var segments = [];
@@ -2825,6 +2819,7 @@ var CheckPathPlugin = function() {
2825
2819
  return toConcatenatedNode(segments);
2826
2820
  };
2827
2821
  var optionallyQuotedSegment = function() {
2822
+ var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
2828
2823
  whitespace();
2829
2824
  if (ch === SINGLE_QUOTE || ch === DOUBLE_QUOTE) {
2830
2825
  var singleQuote = ch === SINGLE_QUOTE;
@@ -2833,7 +2828,7 @@ var CheckPathPlugin = function() {
2833
2828
  next(singleQuote ? SINGLE_QUOTE : DOUBLE_QUOTE);
2834
2829
  return id;
2835
2830
  }
2836
- return simpleSegment();
2831
+ return simpleSegment(allowBoolValue);
2837
2832
  };
2838
2833
  var equals = function() {
2839
2834
  if (ch !== EQUALS) {
@@ -2853,7 +2848,7 @@ var CheckPathPlugin = function() {
2853
2848
  whitespace();
2854
2849
  if (equals()) {
2855
2850
  whitespace();
2856
- var second = optionallyQuotedSegment();
2851
+ var second = optionallyQuotedSegment(true);
2857
2852
  value = toQuery(value, second);
2858
2853
  whitespace();
2859
2854
  }
@@ -3041,7 +3036,7 @@ var CheckPathPlugin = function() {
3041
3036
  appendPathSegments(getValueForNode(resolvedNode));
3042
3037
  break;
3043
3038
  case "Value":
3044
- appendPathSegments(resolvedNode.value);
3039
+ appendPathSegments(typeof resolvedNode.value === "boolean" ? String(resolvedNode.value) : resolvedNode.value);
3045
3040
  break;
3046
3041
  case "Query":
3047
3042
  {
@@ -4621,23 +4616,8 @@ var CheckPathPlugin = function() {
4621
4616
  function Parser() {
4622
4617
  _class_call_check(this, Parser);
4623
4618
  this.hooks = {
4624
- /**
4625
- * A hook to interact with an object _before_ parsing it into an AST
4626
- *
4627
- * @param value - The object we're are about to parse
4628
- * @returns - A new value to parse.
4629
- * If undefined, the original value is used.
4630
- * If null, we stop parsing this node.
4631
- */ onParseObject: new SyncWaterfallHook(),
4632
- /**
4633
- * A callback to interact with an AST _after_ we parse it into the AST
4634
- *
4635
- * @param value - The object we parsed
4636
- * @param node - The AST node we generated
4637
- * @returns - A new AST node to use
4638
- * If undefined, the original value is used.
4639
- * If null, we ignore this node all together
4640
- */ onCreateASTNode: new SyncWaterfallHook(),
4619
+ onParseObject: new SyncWaterfallHook(),
4620
+ onCreateASTNode: new SyncWaterfallHook(),
4641
4621
  parseNode: new SyncBailHook()
4642
4622
  };
4643
4623
  }
@@ -4779,20 +4759,14 @@ var CheckPathPlugin = function() {
4779
4759
  function Resolver(root, options) {
4780
4760
  _class_call_check(this, Resolver);
4781
4761
  this.hooks = {
4782
- /** A hook to allow skipping of the resolution tree for a specific node */ skipResolve: new SyncWaterfallHook(),
4783
- /** An event emitted before calculating the next update */ beforeUpdate: new SyncHook(),
4784
- /** An event emitted after calculating the next update */ afterUpdate: new SyncHook(),
4785
- /** The options passed to a node to resolve it to an object */ resolveOptions: new SyncWaterfallHook(),
4786
- /** A hook to transform the AST node into a new AST node before resolving it */ beforeResolve: new SyncWaterfallHook(),
4787
- /**
4788
- * A hook to transform an AST node into it's resolved value.
4789
- * This runs _before_ any children are resolved
4790
- */ resolve: new SyncWaterfallHook(),
4791
- /**
4792
- * A hook to transform the resolved value of an AST node.
4793
- * This runs _after_ all children nodes are resolved
4794
- */ afterResolve: new SyncWaterfallHook(),
4795
- /** Called at the very end of a node's tree being updated */ afterNodeUpdate: new SyncHook()
4762
+ skipResolve: new SyncWaterfallHook(),
4763
+ beforeUpdate: new SyncHook(),
4764
+ afterUpdate: new SyncHook(),
4765
+ resolveOptions: new SyncWaterfallHook(),
4766
+ beforeResolve: new SyncWaterfallHook(),
4767
+ resolve: new SyncWaterfallHook(),
4768
+ afterResolve: new SyncWaterfallHook(),
4769
+ afterNodeUpdate: new SyncHook()
4796
4770
  };
4797
4771
  this.root = root;
4798
4772
  this.options = options;
@@ -4800,6 +4774,7 @@ var CheckPathPlugin = function() {
4800
4774
  this.ASTMap = /* @__PURE__ */ new Map();
4801
4775
  this.logger = options.logger;
4802
4776
  this.idCache = /* @__PURE__ */ new Set();
4777
+ this.AsyncIdMap = /* @__PURE__ */ new Map();
4803
4778
  }
4804
4779
  _create_class(Resolver, [
4805
4780
  {
@@ -4810,13 +4785,27 @@ var CheckPathPlugin = function() {
4810
4785
  },
4811
4786
  {
4812
4787
  key: "update",
4813
- value: function update(changes) {
4788
+ value: function update(changes, asyncChanges) {
4789
+ var _this = this;
4814
4790
  this.hooks.beforeUpdate.call(changes);
4815
4791
  var resolveCache = /* @__PURE__ */ new Map();
4816
4792
  this.idCache.clear();
4817
4793
  var prevASTMap = new Map(this.ASTMap);
4818
4794
  this.ASTMap.clear();
4819
- var updated = this.computeTree(this.root, void 0, changes, resolveCache, toNodeResolveOptions(this.options), void 0, prevASTMap);
4795
+ var prevAsyncIdMap = new Map(this.AsyncIdMap);
4796
+ var nextAsyncIdMap = /* @__PURE__ */ new Map();
4797
+ asyncChanges === null || asyncChanges === void 0 ? void 0 : asyncChanges.forEach(function(id) {
4798
+ var current = prevAsyncIdMap.get(id);
4799
+ while(current && prevASTMap.has(current)){
4800
+ var next = prevASTMap.get(current);
4801
+ if (next && _this.resolveCache.has(next)) {
4802
+ _this.resolveCache.delete(next);
4803
+ }
4804
+ current = current.parent;
4805
+ }
4806
+ });
4807
+ var updated = this.computeTree(this.root, void 0, changes, resolveCache, toNodeResolveOptions(this.options), void 0, prevASTMap, nextAsyncIdMap);
4808
+ this.AsyncIdMap = nextAsyncIdMap;
4820
4809
  this.resolveCache = resolveCache;
4821
4810
  this.hooks.afterUpdate.call(updated.value);
4822
4811
  return updated.value;
@@ -4870,9 +4859,8 @@ var CheckPathPlugin = function() {
4870
4859
  },
4871
4860
  {
4872
4861
  key: "computeTree",
4873
- value: function computeTree(node, rawParent, dataChanges, cacheUpdate, options, partiallyResolvedParent, prevASTMap) {
4862
+ value: function computeTree(node, rawParent, dataChanges, cacheUpdate, options, partiallyResolvedParent, prevASTMap, nextAsyncIdMap) {
4874
4863
  var _this = this;
4875
- var _partiallyResolvedParent_parent_parent, _partiallyResolvedParent_parent, _resolvedAST_parent, _partiallyResolvedParent_parent1;
4876
4864
  var dependencyModel = new DependencyModel(options.data.model);
4877
4865
  dependencyModel.trackSubset("core");
4878
4866
  var depModelWithParser = withContext(withParser(dependencyModel, this.options.parseBinding));
@@ -4891,15 +4879,6 @@ var CheckPathPlugin = function() {
4891
4879
  var previousDeps = previousResult === null || previousResult === void 0 ? void 0 : previousResult.dependencies;
4892
4880
  var dataChanged = caresAboutDataChanges(dataChanges, previousDeps);
4893
4881
  var shouldUseLastValue = this.hooks.skipResolve.call(!dataChanged, node, resolveOptions);
4894
- var clonedNode = _object_spread_props(_object_spread({}, this.cloneNode(node)), {
4895
- parent: partiallyResolvedParent
4896
- });
4897
- var _this_hooks_beforeResolve_call;
4898
- var resolvedAST = (_this_hooks_beforeResolve_call = this.hooks.beforeResolve.call(clonedNode, resolveOptions)) !== null && _this_hooks_beforeResolve_call !== void 0 ? _this_hooks_beforeResolve_call : {
4899
- type: "empty"
4900
- };
4901
- var isNestedMultiNodeWithAsync = resolvedAST.type === "multi-node" && (partiallyResolvedParent === null || partiallyResolvedParent === void 0 ? void 0 : (_partiallyResolvedParent_parent = partiallyResolvedParent.parent) === null || _partiallyResolvedParent_parent === void 0 ? void 0 : (_partiallyResolvedParent_parent_parent = _partiallyResolvedParent_parent.parent) === null || _partiallyResolvedParent_parent_parent === void 0 ? void 0 : _partiallyResolvedParent_parent_parent.type) === "multi-node" && partiallyResolvedParent.parent.type === "value" && ((_resolvedAST_parent = resolvedAST.parent) === null || _resolvedAST_parent === void 0 ? void 0 : _resolvedAST_parent.type) === "asset" && resolvedAST.parent.value.id.includes("async");
4902
- var isNestedMultiNode = resolvedAST.type === "multi-node" && (partiallyResolvedParent === null || partiallyResolvedParent === void 0 ? void 0 : (_partiallyResolvedParent_parent1 = partiallyResolvedParent.parent) === null || _partiallyResolvedParent_parent1 === void 0 ? void 0 : _partiallyResolvedParent_parent1.type) === "multi-node" && partiallyResolvedParent.type === "value";
4903
4882
  if (previousResult && shouldUseLastValue) {
4904
4883
  var update2 = _object_spread_props(_object_spread({}, previousResult), {
4905
4884
  updated: false
@@ -4911,6 +4890,30 @@ var CheckPathPlugin = function() {
4911
4890
  updated: false
4912
4891
  });
4913
4892
  cacheUpdate.set(AST, resolvedUpdate);
4893
+ if (resolvedUpdate.node.type === "async") {
4894
+ nextAsyncIdMap.set(resolvedUpdate.node.id, resolvedUpdate.node);
4895
+ }
4896
+ var _resolvedUpdate_node_asyncNodesResolved;
4897
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
4898
+ try {
4899
+ for(var _iterator = ((_resolvedUpdate_node_asyncNodesResolved = resolvedUpdate.node.asyncNodesResolved) !== null && _resolvedUpdate_node_asyncNodesResolved !== void 0 ? _resolvedUpdate_node_asyncNodesResolved : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
4900
+ var key = _step.value;
4901
+ nextAsyncIdMap.set(key, resolvedUpdate.node);
4902
+ }
4903
+ } catch (err) {
4904
+ _didIteratorError = true;
4905
+ _iteratorError = err;
4906
+ } finally{
4907
+ try {
4908
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
4909
+ _iterator.return();
4910
+ }
4911
+ } finally{
4912
+ if (_didIteratorError) {
4913
+ throw _iteratorError;
4914
+ }
4915
+ }
4916
+ }
4914
4917
  var handleChildNode = function(childNode) {
4915
4918
  var _prevASTMap_get;
4916
4919
  var originalChildNode = (_prevASTMap_get = prevASTMap.get(childNode)) !== null && _prevASTMap_get !== void 0 ? _prevASTMap_get : childNode;
@@ -4933,10 +4936,37 @@ var CheckPathPlugin = function() {
4933
4936
  repopulateASTMapFromCache(previousResult, node, rawParent);
4934
4937
  return update2;
4935
4938
  }
4936
- if (isNestedMultiNodeWithAsync) {
4937
- resolvedAST.parent = partiallyResolvedParent.parent;
4938
- } else {
4939
- resolvedAST.parent = partiallyResolvedParent;
4939
+ var clonedNode = _object_spread_props(_object_spread({}, this.cloneNode(node)), {
4940
+ parent: partiallyResolvedParent
4941
+ });
4942
+ var _this_hooks_beforeResolve_call;
4943
+ var resolvedAST = (_this_hooks_beforeResolve_call = this.hooks.beforeResolve.call(clonedNode, resolveOptions)) !== null && _this_hooks_beforeResolve_call !== void 0 ? _this_hooks_beforeResolve_call : {
4944
+ type: "empty"
4945
+ };
4946
+ resolvedAST.parent = partiallyResolvedParent;
4947
+ if (resolvedAST.type === "async") {
4948
+ nextAsyncIdMap.set(resolvedAST.id, resolvedAST);
4949
+ }
4950
+ var _resolvedAST_asyncNodesResolved;
4951
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
4952
+ try {
4953
+ for(var _iterator = ((_resolvedAST_asyncNodesResolved = resolvedAST.asyncNodesResolved) !== null && _resolvedAST_asyncNodesResolved !== void 0 ? _resolvedAST_asyncNodesResolved : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
4954
+ var id = _step.value;
4955
+ nextAsyncIdMap.set(id, resolvedAST);
4956
+ }
4957
+ } catch (err) {
4958
+ _didIteratorError = true;
4959
+ _iteratorError = err;
4960
+ } finally{
4961
+ try {
4962
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
4963
+ _iterator.return();
4964
+ }
4965
+ } finally{
4966
+ if (_didIteratorError) {
4967
+ throw _iteratorError;
4968
+ }
4969
+ }
4940
4970
  }
4941
4971
  resolveOptions.node = resolvedAST;
4942
4972
  this.ASTMap.set(resolvedAST, node);
@@ -4950,7 +4980,7 @@ var CheckPathPlugin = function() {
4950
4980
  if ("children" in resolvedAST) {
4951
4981
  var _resolvedAST_children;
4952
4982
  var newChildren = (_resolvedAST_children = resolvedAST.children) === null || _resolvedAST_children === void 0 ? void 0 : _resolvedAST_children.map(function(child) {
4953
- var computedChildTree = _this.computeTree(child.value, node, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap);
4983
+ var computedChildTree = _this.computeTree(child.value, node, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap, nextAsyncIdMap);
4954
4984
  var childTreeDeps = computedChildTree.dependencies, childNode = computedChildTree.node, childUpdated = computedChildTree.updated, childValue = computedChildTree.value;
4955
4985
  childTreeDeps.forEach(function(binding) {
4956
4986
  return childDependencies.add(binding);
@@ -4971,40 +5001,18 @@ var CheckPathPlugin = function() {
4971
5001
  resolvedAST.children = newChildren;
4972
5002
  } else if (resolvedAST.type === "multi-node") {
4973
5003
  var childValue = [];
4974
- var rawParentToPassIn = isNestedMultiNode ? partiallyResolvedParent === null || partiallyResolvedParent === void 0 ? void 0 : partiallyResolvedParent.parent : node;
4975
- var hasAsync = resolvedAST.values.map(function(value, index) {
4976
- return value.type === "async" ? index : -1;
4977
- }).filter(function(index) {
4978
- return index !== -1;
4979
- });
4980
- var newValues = resolvedAST.values.map(function(mValue) {
4981
- var mTree = _this.computeTree(mValue, rawParentToPassIn, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap);
5004
+ var rawParentToPassIn = node;
5005
+ resolvedAST.values = resolvedAST.values.map(function(mValue) {
5006
+ var mTree = _this.computeTree(mValue, rawParentToPassIn, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap, nextAsyncIdMap);
4982
5007
  if (mTree.value !== void 0 && mTree.value !== null) {
4983
- if (mValue.type === "async" && mValue.flatten && mTree.value.asset && Array.isArray(mTree.value.asset.values)) {
4984
- unpackAndPush(mTree.value, childValue);
4985
- } else {
4986
- childValue.push(mTree.value);
4987
- }
5008
+ mTree.dependencies.forEach(function(bindingDep) {
5009
+ return childDependencies.add(bindingDep);
5010
+ });
5011
+ updated = updated || mTree.updated;
5012
+ childValue.push(mTree.value);
4988
5013
  }
4989
- mTree.dependencies.forEach(function(bindingDep) {
4990
- return childDependencies.add(bindingDep);
4991
- });
4992
- updated = updated || mTree.updated;
4993
5014
  return mTree.node;
4994
5015
  });
4995
- if (hasAsync.length > 0) {
4996
- var copy = newValues;
4997
- hasAsync.forEach(function(index) {
4998
- var _copy;
4999
- if (copy[index]) (_copy = copy).splice.apply(_copy, [
5000
- index,
5001
- 1
5002
- ].concat(_to_consumable_array(unpackNode(copy[index]))));
5003
- });
5004
- resolvedAST.values = copy;
5005
- } else {
5006
- resolvedAST.values = newValues;
5007
- }
5008
5016
  resolved = childValue;
5009
5017
  }
5010
5018
  childDependencies.forEach(function(bindingDep) {
@@ -5025,7 +5033,7 @@ var CheckPathPlugin = function() {
5025
5033
  value: resolved,
5026
5034
  dependencies: /* @__PURE__ */ new Set(_to_consumable_array(dependencyModel.getDependencies()).concat(_to_consumable_array(childDependencies)))
5027
5035
  };
5028
- this.hooks.afterNodeUpdate.call(node, isNestedMultiNode ? partiallyResolvedParent === null || partiallyResolvedParent === void 0 ? void 0 : partiallyResolvedParent.parent : rawParent, update);
5036
+ this.hooks.afterNodeUpdate.call(node, rawParent, update);
5029
5037
  cacheUpdate.set(node, update);
5030
5038
  return update;
5031
5039
  }
@@ -5033,15 +5041,6 @@ var CheckPathPlugin = function() {
5033
5041
  ]);
5034
5042
  return Resolver;
5035
5043
  }();
5036
- function unpackAndPush(item, initial) {
5037
- if (item.asset.values && Array.isArray(item.asset.values)) {
5038
- item.asset.values.forEach(function(i) {
5039
- unpackAndPush(i, initial);
5040
- });
5041
- } else {
5042
- initial.push(item);
5043
- }
5044
- }
5045
5044
  var CrossfieldProvider = /*#__PURE__*/ function() {
5046
5045
  function CrossfieldProvider(initialView, parser, logger) {
5047
5046
  _class_call_check(this, CrossfieldProvider);
@@ -5109,9 +5108,11 @@ var CheckPathPlugin = function() {
5109
5108
  _create_class(ViewInstance, [
5110
5109
  {
5111
5110
  key: "updateAsync",
5112
- value: function updateAsync() {
5111
+ value: function updateAsync(asyncNode) {
5113
5112
  var _this_resolver;
5114
- var update = (_this_resolver = this.resolver) === null || _this_resolver === void 0 ? void 0 : _this_resolver.update();
5113
+ var update = (_this_resolver = this.resolver) === null || _this_resolver === void 0 ? void 0 : _this_resolver.update(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set([
5114
+ asyncNode
5115
+ ]));
5115
5116
  this.lastUpdate = update;
5116
5117
  this.hooks.onUpdate.call(update);
5117
5118
  }
@@ -5652,7 +5653,7 @@ var CheckPathPlugin = function() {
5652
5653
  key: "applyParser",
5653
5654
  value: function applyParser(parser) {
5654
5655
  parser.hooks.parseNode.tap("multi-node", function(obj, nodeType, options, childOptions) {
5655
- if (childOptions && !hasTemplateKey(childOptions.key) && Array.isArray(obj)) {
5656
+ if ((childOptions === void 0 || !hasTemplateKey(childOptions.key)) && Array.isArray(obj)) {
5656
5657
  var values = obj.map(function(childVal) {
5657
5658
  return parser.parseObject(childVal, "value", options);
5658
5659
  }).filter(function(child) {
@@ -5663,7 +5664,7 @@ var CheckPathPlugin = function() {
5663
5664
  }
5664
5665
  var multiNode = parser.createASTNode({
5665
5666
  type: "multi-node",
5666
- override: !hasTemplateValues(childOptions.parentObj, childOptions.key),
5667
+ override: childOptions !== void 0 && !hasTemplateValues(childOptions.parentObj, childOptions.key),
5667
5668
  values: values
5668
5669
  }, obj);
5669
5670
  if (!multiNode) {
@@ -5674,7 +5675,7 @@ var CheckPathPlugin = function() {
5674
5675
  v.parent = multiNode;
5675
5676
  });
5676
5677
  }
5677
- return [
5678
+ return childOptions === void 0 ? multiNode : [
5678
5679
  {
5679
5680
  path: _to_consumable_array(childOptions.path).concat([
5680
5681
  childOptions.key