Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.

Commit ad8c1e8

Browse files
committed
Added null checks
1 parent fef1a55 commit ad8c1e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Sidekick.Business/Apis/PoeNinja/PoeNinjaCache.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ public async Task RefreshData()
106106

107107
// PoeNinja also includes translations of an item's description,
108108
// we will strip those by supposing that they always end with a dot (end of sentence).
109-
var flattenedTranslations = itemsTasks.Select(x => x.request.Result.Language.Translations.Where(y => !y.Value.Contains(".")))
109+
var flattenedTranslations = itemsTasks.Select(x => x.request.Result.Language?.Translations?.Where(y => !y.Value.Contains(".")))
110+
.Where(x => x != null)
110111
.SelectMany(x => x)
111112
.Distinct()
112113
.ToDictionary(x => x.Key, x => x.Value);

0 commit comments

Comments
 (0)