Skip to content

Commit c7a83e5

Browse files
committed
empty input escaped
1 parent a2ed8bc commit c7a83e5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

blackjack.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ function game_set(wins){
166166

167167
$(document).ready(function(){
168168
player_name = prompt("請問你是...?");
169+
player_name = player_name ? player_name : "anonymous";
169170
init();
170171

171172

0 commit comments

Comments
 (0)