summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/play.js b/play.js
index cfd9fa1..28530db 100644
--- a/play.js
+++ b/play.js
@@ -204,7 +204,8 @@ function on_update() {
let red_court = view.red_court
let blue_court = view.blue_court
if (opt_sort_tiles) {
- hand = hand.slice().sort(cmp_tile)
+ if (hand)
+ hand = hand.slice().sort(cmp_tile)
red_court = red_court.slice().sort(cmp_tile)
blue_court = blue_court.slice().sort(cmp_tile)
}