Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0e2c78d

Browse files
refactor: add debouncing
1 parent b47afe0 commit 0e2c78d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎050-insect catch game/script.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const addInsects = () => {
2323
};
2424

2525
const catchInsect = function () {
26+
if (this.classList.contains("caught")) return;
2627
increaseScore();
2728
this.classList.add("caught");
2829
setTimeout(() => this.remove, 2000);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /