diff --git a/src/MaaWpfGui/Helper/ConfigurationHelper.cs b/src/MaaWpfGui/Helper/ConfigurationHelper.cs index 3a5e97a145..8f1db0cef0 100644 --- a/src/MaaWpfGui/Helper/ConfigurationHelper.cs +++ b/src/MaaWpfGui/Helper/ConfigurationHelper.cs @@ -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) {