mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 10:27:18 +02:00
fix: bug - null reference for hidden accounts
This commit is contained in:
1 parent
bb16617f3f
commit
7d524fcdcd
7 files changed
+28
-38
No files matched your search
@@ -54,7 +54,7 @@ namespace WotBlitzStatisticsPro.Logic
|
||||
for (int i = 0; i < accounts.Count; i++)
|
||||
{
|
||||
var accountResponse = accounts.ToArray()[i];
|
||||
var shortAccountInfo = shortAccountInfos?.FirstOrDefault(a => a.AccountId == accountResponse.AccountId);
|
||||
var shortAccountInfo = shortAccountInfos?.FirstOrDefault(a => a != null && a.AccountId == accountResponse.AccountId);
|
||||
if (shortAccountInfo != null)
|
||||
{
|
||||
_mapper.Map(shortAccountInfo, accountResponse);
|
||||
|
||||
Reference in new issue
Block a user