summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-06-03 20:56:15 +0200
committerTor Andersson <tor@ccxvii.net>2023-06-03 22:43:39 +0200
commitf39c75af5142db5d2fcdcf9f16d6b6cfad8f80c9 (patch)
tree439f3c0ac59ff5c5914577cf4117926f6caa34c1
parent2f71b847f95ab249b01356b164c4e07b414c47be (diff)
downloadandean-abyss-f39c75af5142db5d2fcdcf9f16d6b6cfad8f80c9.tar.gz
Fix "is an object" check in may_remove_shipment.
typeof null === "object" for obscure historical reasons.
-rw-r--r--rules.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 9b10b63..f9553a6 100644
--- a/rules.js
+++ b/rules.js
@@ -2279,10 +2279,10 @@ states.transfer_dropped_shipments = {
function may_remove_shipment() {
// Captured Goods
- if (typeof game.op === "object" && game.op.type === "Attack")
+ if (game.op !== null && typeof game.op === "object" && game.op.type === "Attack")
return false
// Commandeer
- if (typeof game.sa === "object" && game.sa.commandeer)
+ if (game.sa !== null && typeof game.sa === "object" && game.sa.commandeer)
return false
return true
}