FIx getProfileTraderPurchase() failing when trader doesnt exist in profile

This commit is contained in:
Dev 2024-01-20 20:37:41 +00:00
parent 80b549a2d5
commit af50cb7869

View File

@ -62,7 +62,13 @@ export class TraderPurchasePersisterService
return null; return null;
} }
return profile.traderPurchases[traderId][assortId]; const traderPurchases = profile.traderPurchases[traderId];
if (!traderPurchases)
{
return null;
}
return traderPurchases[assortId];
} }
/** /**