Skip to content

Commit c68de9d

Browse files
author
SwearWord
committed
XmlAttributeDeserializer crashes if value == "". Put in a check for value == string.Empty instead of just checking if value == null.
1 parent 8d210ec commit c68de9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RestSharp/Deserializers/XmlAttributeDeserializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ private void Map(object x, XElement root)
109109

110110
var value = GetValueFromXml(root, name, isAttribute);
111111

112-
if (value == null)
112+
if (value == null || value == string.Empty)
113113
{
114114
// special case for inline list items
115115
if (type.IsGenericType)

0 commit comments

Comments
 (0)