diff --git a/src/MaaWpfGui/Helper/ConfigurationHelper.cs b/src/MaaWpfGui/Helper/ConfigurationHelper.cs index 58c8ed535a..7b2cd8f9a6 100644 --- a/src/MaaWpfGui/Helper/ConfigurationHelper.cs +++ b/src/MaaWpfGui/Helper/ConfigurationHelper.cs @@ -54,9 +54,14 @@ namespace MaaWpfGui.Helper _logger.Debug("Read configuration key {Key} with default value {DefaultValue}, configuration hit: {HasValue}, configuration value {Value}", key, defaultValue, hasValue, value); - return hasValue - ? value - : defaultValue; + if (hasValue) + { + return value; + } + + // return hasValue ? value : defaultValue; + SetValue(key, defaultValue); + return defaultValue; } public static string GetGlobalValue(string key, string defaultValue)