Skip to content

Commit

Permalink
using null-conditional operator
Browse files Browse the repository at this point in the history
  • Loading branch information
rinatxp committed May 2, 2023
1 parent 986fc76 commit acfa6fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/Newtonsoft.Json/JsonReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ private void Push(JsonContainerType value)
private JsonContainerType Pop()
{
JsonPosition oldPosition;
if (_stack != null && _stack.Count > 0)
if (_stack?.Count > 0)
{
oldPosition = _currentPosition;
_currentPosition = _stack[_stack.Count - 1];
Expand Down

0 comments on commit acfa6fe

Please sign in to comment.