diff --git a/project/src/services/TraderPurchasePersisterService.ts b/project/src/services/TraderPurchasePersisterService.ts index 5c4aaa1b..5ace2017 100644 --- a/project/src/services/TraderPurchasePersisterService.ts +++ b/project/src/services/TraderPurchasePersisterService.ts @@ -62,7 +62,13 @@ export class TraderPurchasePersisterService return null; } - return profile.traderPurchases[traderId][assortId]; + const traderPurchases = profile.traderPurchases[traderId]; + if (!traderPurchases) + { + return null; + } + + return traderPurchases[assortId]; } /**