@next-core/editor-bricks-helper 0.47.38 → 0.48.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.
@@ -456,8 +456,21 @@
456
456
 
457
457
  var isBrick = brickUtils.isBrickNode(nodeData);
458
458
  var brickName = isBrick ? nodeData.brick.split(".").pop() : null;
459
+ var unreachable = false;
460
+
461
+ if ((normalized === null || normalized === void 0 ? void 0 : normalized.if) !== undefined && (isBrick || brickUtils.isRouteNode(nodeData))) {
462
+ var check = {
463
+ if: normalized.if
464
+ };
465
+ brickUtils.computeConstantCondition(check);
466
+
467
+ if (check.if === false) {
468
+ unreachable = true;
469
+ }
470
+ }
471
+
459
472
  return Object.fromEntries(Object.entries(nodeData).filter(entry => !nodeIgnoreFields.includes(entry[0])).concat([["alias", // Ignore alias which equals to brick name.
460
- !(isBrick && nodeData.alias === brickName) && nodeData.alias || (isBrick ? nodeData.ref || parsedTestId || parsedId || brickName : undefined)], ["$$uid", nodeUid], ["$$matchedSelectors", matchedSelectors], ["$$isTemplateInternalNode", isTemplateInternalNode], ["$$normalized", normalized]]).concat(parsedFields));
473
+ !(isBrick && nodeData.alias === brickName) && nodeData.alias || (isBrick ? nodeData.ref || parsedTestId || parsedId || brickName : undefined)], ["$$uid", nodeUid], ["$$matchedSelectors", matchedSelectors], ["$$isTemplateInternalNode", isTemplateInternalNode], ["$$normalized", normalized], ["$$unreachable", unreachable]]).concat(parsedFields));
461
474
  }
462
475
 
463
476
  function getAppendingNodesAndEdges(nodeData, nodeUid, templateSourceMap) {