Tigran 4 年之前
父节点
当前提交
4cff1730d0
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;
         }