Skip to content

Commit 997d7e1

Browse files
author
kai
committed
Use forEach instead of map
1 parent 719b942 commit 997d7e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BaseComponent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ export abstract class BaseComponent<T extends Element> {
5757
* Insert component after the last child
5858
*/
5959
public append(...components: BaseComponent<any>[]) {
60-
components.map((component) => this.element.appendChild(component.element))
60+
components.forEach((component) => this.element.appendChild(component.element))
6161
return this;
6262
}
6363

6464
/**
6565
* Insert component before the first child
6666
*/
6767
public prepend(...components: BaseComponent<any>[]) {
68-
components.map((component) => this.element.appendChild(component.element))
68+
components.forEach((component) => this.element.appendChild(component.element))
6969
return this;
7070
}
7171

0 commit comments

Comments
 (0)