Skip to content

Commit c54c812

Browse files
authored
fix: do not use assignedElements (#432)
1 parent e9550ce commit c54c812

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/base/src/UI5Element.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ class UI5Element extends HTMLElement {
579579
if (curr.tagName.toUpperCase() !== "SLOT") {
580580
return acc.concat([curr]);
581581
}
582-
return acc.concat(curr.assignedElements({ flatten: true }));
582+
return acc.concat(curr.assignedNodes({ flatten: true }).filter(item => item instanceof HTMLElement));
583583
};
584584

585585
return this[slotName].reduce(reducer, []);

packages/base/src/UI5ElementMetadata.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const validateSingleSlot = (value, propData) => {
9797
const isSlot = isTag && el.tagName.toUpperCase() === "SLOT";
9898

9999
if (isSlot) {
100-
return el.assignedElements({ flatten: true });
100+
return el.assignedNodes({ flatten: true }).filter(item => item instanceof HTMLElement);
101101
}
102102

103103
return [el];

0 commit comments

Comments
 (0)