Skip to content

Commit 840e545

Browse files
fix: replace forEach with for ... of
1 parent 8f22ab3 commit 840e545

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/tutorial.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,15 @@ export default class Tutorial {
6969
m(
7070
"By the way you might notice more available pieces. You unlocked them buy buying a pawn. You can see all pieces on separate page, accessible from the main menu",
7171
);
72-
document
73-
.querySelectorAll("#castle-menu-top-list > *:not(:first-child)")
74-
.forEach((el) =>
75-
el.addEventListener("click", () => {
76-
m("Great! Now you can enjoy bonuses from your upgrade.");
77-
m(
78-
"And that's all in this tutorial, now you can start new game from the main menu",
79-
true,
80-
);
81-
}),
82-
);
72+
for (const element of document.querySelectorAll("#castle-menu-top-list > *:not(:first-child)")) {
73+
element.addEventListener("click", () => {
74+
m("Great! Now you can enjoy bonuses from your upgrade.");
75+
m(
76+
"And that's all in this tutorial, now you can start new game from the main menu",
77+
true,
78+
);
79+
})
80+
}
8381
}
8482
},
8583
);

0 commit comments

Comments
 (0)