Skip to content

Commit

Permalink
fix(Duplicate): improve duplicating null child objects
Browse files Browse the repository at this point in the history
  • Loading branch information
MingboPeng committed Sep 22, 2023
1 parent 97e2169 commit 9e83eaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Ironbug.HVAC/BaseClass/IB_ModelObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ protected T Duplicate<T>(Func<T> func) where T : IB_ModelObject
newObj.Children.Clear();
foreach (var child in this.Children)
{
newObj.Children.Add(child.Duplicate());
newObj.Children.Add(child?.Duplicate());
}

newObj.IBProperties = this.IBProperties.Duplicate();
Expand Down

0 comments on commit 9e83eaa

Please sign in to comment.