diff --git a/GFramework.Game/Config/YamlConfigSchemaValidator.cs b/GFramework.Game/Config/YamlConfigSchemaValidator.cs index 67dbed7..857d960 100644 --- a/GFramework.Game/Config/YamlConfigSchemaValidator.cs +++ b/GFramework.Game/Config/YamlConfigSchemaValidator.cs @@ -398,8 +398,7 @@ internal static class YamlConfigSchemaValidator if (isValid) { var normalizedValue = NormalizeScalarValue(expectedType, value); - if (allowedValues != null && - allowedValues.Count > 0 && + if (allowedValues is { Count: > 0 } && !allowedValues.Contains(normalizedValue, StringComparer.Ordinal)) { var enumSubject = isArrayItem