summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-11-01 16:06:01 +0100
committerTor Andersson <tor@ccxvii.net>2023-11-01 16:06:38 +0100
commit622f0212c073ced29eea6cf5139e9872a57fdecc (patch)
treed0ac880a4b74b9d7f7f6eb725884bd3711d44fb4 /play.js
parent896f718d3be8259b4d000b6bf2252621439f404d (diff)
downloadalgeria-622f0212c073ced29eea6cf5139e9872a57fdecc.tar.gz
fix stack bug when clicking units off map.
Diffstat (limited to 'play.js')
-rw-r--r--play.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/play.js b/play.js
index 16bc072..a1e2313 100644
--- a/play.js
+++ b/play.js
@@ -369,7 +369,7 @@ function focus_stack(stack) {
if (focus !== stack) {
focus = stack
update_map()
- return stack.length <= 1
+ return !stack || stack.length <= 1
}
return true
}