Skip to content

Commit 01d2952

Browse files
author
Peter B
committed
changed xml deserializer to check IsEmptyOrNull instead of just null. This
was causing an issue deserializing an error string from RestSharp itself when it could not connect to the server.
1 parent e498815 commit 01d2952

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RestSharp/Deserializers/XmlDeserializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public XmlDeserializer()
4040

4141
public T Deserialize<T>(RestResponse response) where T : new()
4242
{
43-
if (response.Content == null)
43+
if (string.IsNullOrEmpty( response.Content ))
4444
return default(T);
4545

4646
var doc = XDocument.Parse(response.Content);

0 commit comments

Comments
 (0)