Tigran 4 năm trước cách đây
mục cha
commit
4cff1730d0
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      MafiaTelegramBot/CustomCollections/StatisticsList.cs

+ 1 - 1
MafiaTelegramBot/CustomCollections/StatisticsList.cs

@@ -10,7 +10,7 @@ namespace MafiaTelegramBot.CustomCollections
 
         public StatisticsEntity this[Roles role]
         {
-            get => _statistics[role] ?? new StatisticsEntity();
+            get => _statistics.ContainsKey(role) ? _statistics[role] : new StatisticsEntity();
             set => _statistics[role] = value;
         }