Skip to content

Commit

Permalink
fix: return null instead of null forgiving operator
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <[email protected]>
  • Loading branch information
baywet authored and MartinM85 committed Jul 11, 2024
1 parent 006bdfc commit 982faa6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/serialization/text/TextParseNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ public TextParseNode(string? text)
#else
public T? GetEnumValue<T>() where T : struct, Enum
#endif
=> EnumHelpers.GetEnumValue<T>(Text!);
=> Text is null ? null : EnumHelpers.GetEnumValue<T>(Text);
}

0 comments on commit 982faa6

Please sign in to comment.