chore: 无配置字段时储存默认值

This commit is contained in:
uye
2023-09-17 15:59:57 +08:00
parent 5e8dbf416d
commit 2be46c4b52

View File

@@ -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)