Skip to content

Commit a9acc87

Browse files
committed
Merge remote-tracking branch 'orukusaki/fix-child-content-finding' into community_picked_batch2
2 parents fc0d7d9 + 7751230 commit a9acc87

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/stage-builder.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/stage-builder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,14 +245,14 @@ function createInitialElementData(fields: ConfigFieldInterface): FieldDefaultsIn
245245
*/
246246
function getElementChildren(element: HTMLElement): HTMLElement[] {
247247
if (element.hasChildNodes()) {
248-
let children: any[] = [];
248+
const children: any[] = [];
249249
// Find direct children of the element
250250
_.forEach(element.childNodes, (child: HTMLElement) => {
251251
if (child.nodeType === Node.ELEMENT_NODE) {
252252
if (child.hasAttribute(Config.getConfig("dataContentTypeAttributeName"))) {
253253
children.push(child);
254254
} else {
255-
children = getElementChildren(child);
255+
children.push(...getElementChildren(child));
256256
}
257257
}
258258
});

0 commit comments

Comments
 (0)