Skip to content

Commit d7ba32e

Browse files
Use template literals for string interpolation
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 4d9c6c8 commit d7ba32e

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
@@ -29,7 +29,7 @@ export class DocumentComponent extends NodeComponent<DocumentFragment> {
2929
* string literal
3030
*/
3131
public static tag(strings: TemplateStringsArray, ...components: NodeComponent<any>[]): DocumentComponent {
32-
const idPrefix = "tag-" + crypto.randomUUID() + "-";
32+
const idPrefix = `tag-${crypto.randomUUID()}-`;
3333
const doc = new DocumentComponent(strings.reduce((acc, str, index) => acc += `${str}${index < components.length ? `<slot name="${idPrefix}${index - 1}"></slot>` : ""}`, ""));
3434
for (const [index, component] of components.entries())
3535
component.slot(idPrefix + index, doc.node);

0 commit comments

Comments
 (0)