Skip to content

Commit

Permalink
[Fix] Iteration.QueryUnreferencedElements in case topelement is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
samatstariongroup committed Oct 19, 2024
1 parent 1f5876d commit a84f512
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CDP4Common/Poco/Iteration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public IEnumerable<ElementDefinition> QueryUnreferencedElements()

var unreferencedElementDefinitions = this.Element.ToList();
unreferencedElementDefinitions.RemoveAll(x => associatedElementDefinitions.Any(e => e.Iid == x.Iid));
unreferencedElementDefinitions.RemoveAll(x => x.Iid == this.TopElement.Iid);
unreferencedElementDefinitions.RemoveAll(x => x.Iid == this.TopElement?.Iid);

return unreferencedElementDefinitions;
}
Expand Down

0 comments on commit a84f512

Please sign in to comment.