UPDATE: Fix bug
All checks were successful
Gitea Auto Deploy / Deploy-Container (push) Successful in 1m1s

This commit is contained in:
2026-01-10 20:27:28 +07:00
parent f837e880d0
commit 21b5d2f2d8

View File

@@ -117,18 +117,18 @@ export default function CeBar() {
if (!extraData || !extraData.theory_craft?.mode) return if (!extraData || !extraData.theory_craft?.mode) return
const newExtraData = structuredClone(extraData) const newExtraData = structuredClone(extraData)
if (!newExtraData.theory_craft.hp) { if (!newExtraData?.theory_craft?.hp) {
newExtraData.theory_craft.hp = {} newExtraData.theory_craft!.hp = {}
} }
for (let i = 0; i < ce_config.monsters.length; i++) { for (let i = 0; i < ce_config.monsters.length; i++) {
const waveKey = (i + 1).toString() const waveKey = (i + 1).toString()
if (!newExtraData.theory_craft.hp[waveKey]) { if (!newExtraData.theory_craft!.hp[waveKey]) {
newExtraData.theory_craft.hp[waveKey] = [] newExtraData.theory_craft!.hp[waveKey] = []
} }
for (let j = 0; j < ce_config.monsters[i].length; j++) { for (let j = 0; j < ce_config.monsters[i].length; j++) {
if (newExtraData.theory_craft.hp[waveKey][j] === undefined) { if (newExtraData.theory_craft!.hp[waveKey][j] === undefined) {
newExtraData.theory_craft.hp[waveKey][j] = 0 newExtraData.theory_craft!.hp[waveKey][j] = 0
} }
} }
} }
@@ -399,10 +399,10 @@ export default function CeBar() {
const newData = structuredClone(extraData) const newData = structuredClone(extraData)
if (!newData?.theory_craft?.hp?.[(waveIndex + 1).toString()]) { if (!newData?.theory_craft?.hp?.[(waveIndex + 1).toString()]) {
newData.theory_craft.hp[(waveIndex + 1).toString()] = [] newData.theory_craft!.hp![(waveIndex + 1).toString()] = []
} }
newData.theory_craft.hp[(waveIndex + 1).toString()][memberIndex] = val newData.theory_craft!.hp![(waveIndex + 1).toString()][memberIndex] = val
setExtraData(newData) setExtraData(newData)
}} }}