Skip to content

Commit

Permalink
Avoid changing the serializer root element per request
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyzimarev committed Jan 17, 2022
1 parent 95f1324 commit b7a17e0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/RestSharp/RestClient.Serialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ internal RestResponse<T> Deserialize<T>(RestRequest request, RestResponse raw) {
withDateFormat.DateFormat = xmlRequest.DateFormat!;
}

if (handler is IWithRootElement deserializer && !request.RootElement.IsEmpty()) deserializer.RootElement = request.RootElement;

if (handler != null) response.Data = handler.Deserialize<T>(raw);
}
}
Expand Down

0 comments on commit b7a17e0

Please sign in to comment.