Skip to content

Commit

Permalink
fix: unknown slots no longer cause an error (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladitasev authored Feb 26, 2019
1 parent ff93da8 commit a033326
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/base/src/sap/ui/webcomponents/base/WebComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ class WebComponent extends HTMLElement {
const autoIncrementMap = new Map();
domChildren.forEach(child => {
const slot = child.getAttribute("data-ui5-slot") || this.constructor.getMetadata().getDefaultSlot();
if (slotsMap[slot] === "undefined") {
if (slotsMap[slot] === undefined) {
const validValues = Object.keys(slotsMap).join(", ");
console.warn(`Unknown data-ui5-slot value: ${slot}, ignoring`, child, `Valid data-ui5-slot values are: ${validValues}`); // eslint-disable-line
return;
}
let slotName;
Expand Down

0 comments on commit a033326

Please sign in to comment.