Skip to content

Commit b392e5e

Browse files
committed
Fix index access
1 parent 0a01701 commit b392e5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DocumentComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class DocumentComponent extends NodeComponent<DocumentFragment> {
3333
const nodes: NodeComponent<any>[] = [];
3434
const doc = new DocumentComponent(strings.reduce((acc, str, index) => {
3535
if (index >= components.length) return acc + str;
36-
const component = components[index - 1];
36+
const component = components[index];
3737
if (component instanceof NodeComponent) {
3838
nodes.push(component);
3939
return `${acc}${str}<slot name="${idPrefix}${nodes.length - 1}"></slot>`;

0 commit comments

Comments
 (0)