Skip to content

Commit 4203607

Browse files
committed
add return in default click handler behavior
1 parent 9fdff11 commit 4203607

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

01 - JavaScript Drum Kit/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<script>
6161
function getClickKey(e) {
6262
if (!e.target.getAttribute('data-key')) return e.target.parentNode.getAttribute('data-key');
63-
selectedKey = e.target.getAttribute('data-key');
63+
return selectedKey = e.target.getAttribute('data-key');
6464
}
6565

6666
function playSound(e) {

0 commit comments

Comments
 (0)