fix: wire SSE for bot fights on mount — rounds weren't displayed in practice mode
wireSSE() was only called for human fights in onMounted, so bot fights (webhook/poll mode) never received round_start/round_end events. The fight ran server-side but the frontend showed nothing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
18e4b05399
commit
ebf6667f8f
@@ -528,12 +528,10 @@ onMounted(async () => {
|
|||||||
|
|
||||||
if (isLive.value) {
|
if (isLive.value) {
|
||||||
startPolling({ onFinished: () => stopHumanPolling(), onTimeout: () => stopHumanPolling(), keepLive: isHumanFight.value })
|
startPolling({ onFinished: () => stopHumanPolling(), onTimeout: () => stopHumanPolling(), keepLive: isHumanFight.value })
|
||||||
if (isHumanFight.value) {
|
|
||||||
wireSSE()
|
wireSSE()
|
||||||
// Scene init + human polling are handled by the liveFightData watcher
|
// Scene init + human polling are handled by the liveFightData watcher
|
||||||
// (avoids double init if loadFight already set liveFightData)
|
// (avoids double init if loadFight already set liveFightData)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user