Skip to content

Commit da23419

Browse files
committed
Fix warning in XmlAttributeDeserializer
1 parent 35154c9 commit da23419

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

RestSharp/Deserializers/XmlAttributeDeserializer.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
using System.Linq;
2222
using System.Xml;
2323
using System.Xml.Linq;
24+
using RestSharp.Authenticators.OAuth.Extensions;
2425
using RestSharp.Extensions;
2526

2627
namespace RestSharp.Deserializers
@@ -109,7 +110,8 @@ private void Map(object x, XElement root)
109110

110111
var value = GetValueFromXml(root, name, isAttribute);
111112

112-
if (value == null || value == string.Empty)
113+
var stringValue = value as string;
114+
if (stringValue.IsNullOrBlank())
113115
{
114116
// special case for inline list items
115117
if (type.IsGenericType)

0 commit comments

Comments
 (0)