@next-core/editor-bricks-helper 0.47.26 → 0.47.27

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.
@@ -454,7 +454,10 @@
454
454
  }
455
455
  }
456
456
 
457
- return Object.fromEntries(Object.entries(nodeData).filter(entry => !nodeIgnoreFields.includes(entry[0])).concat([["alias", nodeData.alias || (brickUtils.isBrickNode(nodeData) ? nodeData.ref || parsedTestId || parsedId || nodeData.brick.split(".").pop() : undefined)], ["$$uid", nodeUid], ["$$matchedSelectors", matchedSelectors], ["$$isTemplateInternalNode", isTemplateInternalNode], ["$$normalized", normalized]]).concat(parsedFields));
457
+ var isBrick = brickUtils.isBrickNode(nodeData);
458
+ var brickName = isBrick ? nodeData.brick.split(".").pop() : null;
459
+ 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));
458
461
  }
459
462
 
460
463
  function getAppendingNodesAndEdges(nodeData, nodeUid, templateSourceMap) {