Skip to content

Commit

Permalink
Fix expression to work with Unity 2020 or lower
Browse files Browse the repository at this point in the history
  • Loading branch information
nowsprinting committed Oct 27, 2024
1 parent e065db4 commit 2e9b6cf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Runtime/Comparers/XDocumentComparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ private static XElement GetChildOrNextElement(XElement element)
private static XElement FindElementAndRemove(XElement target, ref Dictionary<string, List<XElement>> dictionary)
{
var xPath = GetXPath(target);
var elements = dictionary.GetValueOrDefault(xPath);
if (elements == null)
if (!dictionary.TryGetValue(xPath, out var elements))
{
return null;
}
Expand Down

0 comments on commit 2e9b6cf

Please sign in to comment.