Commits

HexRx committed 4f8ad76

Fixed method of deserialize auth info

Comments (0)

Files changed (1)

KPDataSave/AccountState.cs

 
         public static AccountState Deserialize(IPluginHost host)
         {
-            if (_account.Token != null)
+            if (_account != null)
                 return _account;
             string value = host.CustomConfig.GetString(Key);
             // Если в конфиге пусто - возвращаем null
             if (value.Length == 0)
                 return null;
-            return (AccountState)JsonConvert.DeserializeObject(value);
+            return JsonConvert.DeserializeObject<AccountState>(value);
         }
     }
 }