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

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