Skip to content

Commit bff4aff

Browse files
committed
fix null check
1 parent 9998fb5 commit bff4aff

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Caliburn.Micro.Platform/Platforms/uap/XamlMetadataProvider.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,7 @@ public override object CreateFromString(String input)
428428
{
429429
var key = _enumValues.FirstOrDefault(kvp => String.Equals(trimmedValue, kvp.Key, StringComparison.OrdinalIgnoreCase));
430430

431-
if (key.Value != null)
432-
{
433-
enumFieldValue = Convert.ToInt32(key.Value);
434-
}
435-
431+
enumFieldValue = Convert.ToInt32(key.Value ?? 0);
436432
}
437433
}
438434

0 commit comments

Comments
 (0)