fix(webui): error on unrevealed riven mod

This commit is contained in:
Sainan 2025-01-12 08:20:35 +01:00
parent 8ebd7068e2
commit 245ee8b101

View File

@ -327,7 +327,7 @@ function updateInventory() {
if (item.ItemType.substr(0, 32) == "/Lotus/Upgrades/Mods/Randomized/") {
const rivenType = item.ItemType.substr(32);
const fingerprint = JSON.parse(item.UpgradeFingerprint);
if (fingerprint.buffs) { // Riven has been revealed?
const tr = document.createElement("tr");
{
const td = document.createElement("td");
@ -372,7 +372,9 @@ function updateInventory() {
tr.appendChild(td);
}
document.getElementById("riven-list").appendChild(tr);
} else {
return;
}
}
const tr = document.createElement("tr");
const rank = parseInt(JSON.parse(item.UpgradeFingerprint).lvl);
const maxRank = itemMap[item.ItemType]?.fusionLimit ?? 5;
@ -410,7 +412,6 @@ function updateInventory() {
tr.appendChild(td);
}
document.getElementById("mods-list").appendChild(tr);
}
});
data.RawUpgrades.forEach(item => {
if (item.ItemCount > 0) {