Skip to content

Commit

Permalink
fix: do not use assignedElements (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladitasev authored May 23, 2019
1 parent e9550ce commit c54c812
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/base/src/UI5Element.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ class UI5Element extends HTMLElement {
if (curr.tagName.toUpperCase() !== "SLOT") {
return acc.concat([curr]);
}
return acc.concat(curr.assignedElements({ flatten: true }));
return acc.concat(curr.assignedNodes({ flatten: true }).filter(item => item instanceof HTMLElement));
};

return this[slotName].reduce(reducer, []);
Expand Down
2 changes: 1 addition & 1 deletion packages/base/src/UI5ElementMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const validateSingleSlot = (value, propData) => {
const isSlot = isTag && el.tagName.toUpperCase() === "SLOT";

if (isSlot) {
return el.assignedElements({ flatten: true });
return el.assignedNodes({ flatten: true }).filter(item => item instanceof HTMLElement);
}

return [el];
Expand Down

0 comments on commit c54c812

Please sign in to comment.