From 71da9b12143029d9975b8bda27be5032df33a8a9 Mon Sep 17 00:00:00 2001 From: GaboGG Date: Sun, 26 Jul 2026 13:35:12 -0400 Subject: [PATCH] v0.13.9 - Fix ReferenceError: battleLog is not defined - The vitals observer check 'battleLog && !battleLog.summary' referenced an undefined variable, throwing on every observer tick - Simplified to just check for pane_completion existence - This crash may have been interfering with state parsing on the observer --- scripts/hv-unified.user.js | 2 +- scripts/latest.user.js | 2 +- src/init.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/hv-unified.user.js b/scripts/hv-unified.user.js index d6c6ec5..082dd49 100644 --- a/scripts/hv-unified.user.js +++ b/scripts/hv-unified.user.js @@ -3287,7 +3287,7 @@ function initializeBattle() { refreshUI(); updateConfigButton(); // Check if battle ended (completion pane appeared) - if (document.getElementById('pane_completion') && battleLog && !battleLog.summary) { + if (document.getElementById('pane_completion')) { finalizeBattleLog(); } }); diff --git a/scripts/latest.user.js b/scripts/latest.user.js index d6c6ec5..082dd49 100644 --- a/scripts/latest.user.js +++ b/scripts/latest.user.js @@ -3287,7 +3287,7 @@ function initializeBattle() { refreshUI(); updateConfigButton(); // Check if battle ended (completion pane appeared) - if (document.getElementById('pane_completion') && battleLog && !battleLog.summary) { + if (document.getElementById('pane_completion')) { finalizeBattleLog(); } }); diff --git a/src/init.js b/src/init.js index d87b1fb..1eca743 100644 --- a/src/init.js +++ b/src/init.js @@ -88,7 +88,7 @@ function initializeBattle() { refreshUI(); updateConfigButton(); // Check if battle ended (completion pane appeared) - if (document.getElementById('pane_completion') && battleLog && !battleLog.summary) { + if (document.getElementById('pane_completion')) { finalizeBattleLog(); } });