diff --git a/project/src/controllers/InventoryController.ts b/project/src/controllers/InventoryController.ts index 82eef6e1..c9c148e5 100644 --- a/project/src/controllers/InventoryController.ts +++ b/project/src/controllers/InventoryController.ts @@ -340,8 +340,8 @@ export class InventoryController ): IItemEventRouterResponse { const inventoryItems = this.inventoryHelper.getOwnerInventoryItems(body, sessionID); - const sourceItem = inventoryItems.from.find(item => item._id == body.item); - const destinationItem = inventoryItems.to.find(item => item._id == body.with); + const sourceItem = inventoryItems.from.find((item) => item._id == body.item); + const destinationItem = inventoryItems.to.find((item) => item._id == body.with); if (sourceItem === null) { @@ -458,6 +458,11 @@ export class InventoryController { if (item._id && item._id === body.item) { + if (!item.upd) + { + item.upd = {}; + } + item.upd.Foldable = { Folded: body.value }; return this.eventOutputHolder.getOutput(sessionID); }