Skip to content

Commit 9f85d6a

Browse files
authored
Fix index access (#29)
2 parents 0a01701 + b392e5e commit 9f85d6a

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)