Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3717a22

Browse files
authored
Update snake.js
1 parent 01d1a17 commit 3717a22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/snake.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ SNAKE.Board = SNAKE.Board || (function() {
681681

682682
elmHighscorePanel = document.createElement("div");
683683
elmHighscorePanel.className = "snake-panel-component";
684-
elmHighscorePanel.innerHTML = "Highscore: " + localStorage.jsSnakeHighScore;
684+
elmHighscorePanel.innerHTML = "Highscore: " + (localStorage.jsSnakeHighScore || 0);
685685

686686
elmWelcome = createWelcomeElement();
687687
elmTryAgain = createTryAgainElement();

0 commit comments

Comments
 (0)