Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Commit 80bee47

Browse files
committed
Fixed failing test.
1 parent c7fc8fd commit 80bee47

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

XmlAbstraction/XmlObject.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,11 @@ public string Read(string elementname, string attributename)
547547
}
548548
else if (elem != null)
549549
{
550-
return elem.Attribute(attributename).Value;
550+
var attribute = elem.Attribute(attributename);
551+
if (attribute != null)
552+
{
553+
return attribute.Value;
554+
}
551555
}
552556
else if (this.ElementsAdded.ContainsKey(elementname))
553557
{

0 commit comments

Comments
 (0)