Addendum because I am sleep-deprived
Some checks failed
Build / build (pull_request) Failing after 24s

This commit is contained in:
2025-11-17 07:17:22 -05:00
parent d970ce9574
commit 75673cc715

View File

@@ -108,7 +108,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
arr[arr.indexOf(upgrade.ItemId.$id)] = "";
}
// We need to convert RawUpgrade into Upgrade once it's attached
const rawUpgrade = inventory.RawUpgrades.find(x => x.ItemType == upgrade.ItemType);
const rawUpgrade = inventory.RawUpgrades.id(upgrade.ItemId.$id);
if (rawUpgrade) {
const newId = new Types.ObjectId().toString();
arr[upgrade.Slot - 1] = newId;