Skip to content

Commit 4a4ee4a

Browse files
committed
fix: updating hyperHTML wire call to include a reference to the component being wired up
1 parent 5c299e6 commit 4a4ee4a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

packages/core/renderers/renderer-hyperhtml.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function BoltComponent(Base = HTMLElement) {
4848
styles = styles.join(' ');
4949

5050
if (this.useShadow) {
51-
return hyper.wire() `
51+
return hyper.wire(this) `
5252
<style>${ styles} </style>
5353
`;
5454
}
@@ -57,17 +57,17 @@ export function BoltComponent(Base = HTMLElement) {
5757
slot(name) {
5858
if (this.useShadow && hasNativeShadowDomSupport) {
5959
if (name === 'default') {
60-
return hyper.wire() `
60+
return hyper.wire(this) `
6161
<slot />
6262
`;
6363
} else {
64-
return hyper.wire() `
64+
return hyper.wire(this) `
6565
<slot name="${name}" />
6666
`;
6767
}
6868
} else {
6969
if (this.slots[name]) {
70-
return hyper.wire() `
70+
return hyper.wire(this) `
7171
${this.slots.default}
7272
`;
7373
}
@@ -88,15 +88,15 @@ export function BoltComponent(Base = HTMLElement) {
8888

8989
// Loop through nodelist
9090
this.childNodes.forEach(function (child, index, nodelist) {
91-
const slotName = child.getAttribute ? child.getAttribute("slot") : null;
91+
const slotName = child.getAttribute ? child.getAttribute("slot") : null;
9292

93-
if (!slotName) {
93+
if (!slotName) {
9494
elem.slots.default.push(child);
95-
} else {
95+
} else {
9696
elem.slots[slotName] = child;
97-
}
98-
});
99-
}
97+
}
98+
});
99+
}
100100

101101
get renderRoot() {
102102
if (hasNativeShadowDomSupport && this.useShadow === true) {

0 commit comments

Comments
 (0)