Skip to content

Commit a5d9534

Browse files
committed
Pressing enter loads next page
When you press enter you will be redirected to the next step in the tutorial. See #20
1 parent 3ce5f6f commit a5d9534

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/playfield.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ window.addEventListener("load", function(){
168168
});
169169

170170
window.addEventListener("keypress", function(){
171-
var next = document.getElementsByClassName("next-page").href;
172-
if (!(!next | next.length === 0)) {
171+
var next = document.getElementsByClassName("next-page")[0].href;
172+
if (!(undefined === next | !next | next.length === 0)) {
173173
window.location.href = next;
174174
}
175175
});

0 commit comments

Comments
 (0)