diff --git a/project/src/controllers/QuestController.ts b/project/src/controllers/QuestController.ts index 73fd42fb..c4d72fd4 100644 --- a/project/src/controllers/QuestController.ts +++ b/project/src/controllers/QuestController.ts @@ -887,10 +887,11 @@ export class QuestController childItems.shift(); // Remove the parent // Sort by the current `location` and update - childItems.sort((a, b) => a.location > b.location ? 1 : -1).forEach((item, index) => + childItems.sort((a, b) => a.location > b.location ? 1 : -1); + for (const [index, item] of childItems.entries()) { item.location = index; - }); + } } } }