fix: qodana

This commit is contained in:
status102
2023-10-22 16:59:41 +08:00
parent b2e6e1de77
commit e563cac4fc

View File

@@ -372,7 +372,7 @@ namespace MaaWpfGui.Helper
try
{
var obj = (JObject)JsonConvert.DeserializeObject(str);
return obj is null ? throw new Exception("Failed to parse json file") : obj;
return obj ?? throw new Exception("Failed to parse json file");
}
catch (Exception ex)
{