From 9c8f4d64c804693f1eeeef0af8db365d877a5b9e Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sat, 5 Oct 2024 16:31:32 +0100 Subject: [PATCH] fix: check for value type default --- VpSharp/src/Internal/ValueConverters/WorldSettingsConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VpSharp/src/Internal/ValueConverters/WorldSettingsConverter.cs b/VpSharp/src/Internal/ValueConverters/WorldSettingsConverter.cs index 60c0c60..7173e27 100644 --- a/VpSharp/src/Internal/ValueConverters/WorldSettingsConverter.cs +++ b/VpSharp/src/Internal/ValueConverters/WorldSettingsConverter.cs @@ -23,7 +23,7 @@ internal static class WorldSettingsConverter object? propertyValue = property.GetValue(settings); Type propertyType = property.PropertyType; - if (propertyValue is null) + if (propertyValue is null || (propertyType.IsValueType && propertyValue == Activator.CreateInstance(propertyType))) { continue; }