Skip to content

Commit

Permalink
Fix XML event parser
Browse files Browse the repository at this point in the history
  • Loading branch information
louisaxel-ambroise committed Feb 23, 2023
1 parent 0fd0da9 commit 4b2129a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ private Event ParseEventListExtension(XElement element)

return eventElement.Name.LocalName switch
{
"TransformationEvent" => ParseTransformationEvent(element),
"extension" => ParseEventListSubExtension(element),
"TransformationEvent" => ParseTransformationEvent(eventElement),
"extension" => ParseEventListSubExtension(eventElement),
_ => throw new ArgumentException($"Element '{element.Name.LocalName}' not expected in this context")
};
}
Expand All @@ -52,7 +52,7 @@ private Event ParseEventListSubExtension(XElement element)
var eventElement = element.Elements().First();

return eventElement.Name.LocalName == "AssociationEvent"
? ParseAssociationEvent(element)
? ParseAssociationEvent(eventElement)
: throw new ArgumentException($"Element '{element.Name.LocalName}' not expected in this context");
}

Expand Down

0 comments on commit 4b2129a

Please sign in to comment.