summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/play.js b/play.js
index 54a9853..10185a2 100644
--- a/play.js
+++ b/play.js
@@ -1394,9 +1394,9 @@ function update_battle() {
ui.garrison.replaceChildren()
if (view.battle.garrison) {
for (let i = 0; i < view.battle.garrison.knights; ++i)
- add_force(parent, KNIGHTS, -1, 0)
+ add_force(ui.garrison, KNIGHTS, -1, 0)
for (let i = 0; i < view.battle.garrison.men_at_arms; ++i)
- add_force(parent, MEN_AT_ARMS, -1, 0)
+ add_force(ui.garrison, MEN_AT_ARMS, -1, 0)
}
}
@@ -1496,7 +1496,7 @@ function on_update() {
ui.veche.classList.toggle("action", is_veche_action())
- if (view.battle) {
+ if (view.battle && view.battle.array) {
ui.battle_panel.classList.remove("hide")
ui.battle_header.textContent = "~ Battle at " + data.locales[view.battle.where].name + " ~"
if (view.battle.attacker === player) {