From b8f953e00cf28832117e516889d43bbf0e0c7970 Mon Sep 17 00:00:00 2001 From: CWX Date: Mon, 20 Jan 2025 00:06:16 +0000 Subject: [PATCH] hopefully fix --- .../Services/TraderPurchasePersisterService.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Libraries/Core/Services/TraderPurchasePersisterService.cs b/Libraries/Core/Services/TraderPurchasePersisterService.cs index 57194044..d12346f3 100644 --- a/Libraries/Core/Services/TraderPurchasePersisterService.cs +++ b/Libraries/Core/Services/TraderPurchasePersisterService.cs @@ -30,9 +30,17 @@ public class TraderPurchasePersisterService( { var profile = _profileHelper.GetFullProfile(sessionId); - return profile.TraderPurchases is null - ? null - : profile.TraderPurchases[traderId]; + if (profile.TraderPurchases is null) + { + return null; + } + + if (profile.TraderPurchases.ContainsKey(traderId)) + { + return profile.TraderPurchases[traderId]; + } + + return null; } /**