Skip to content

Commit

Permalink
Added exception handler
Browse files Browse the repository at this point in the history
  • Loading branch information
vietle-bh authored and pawelbaran committed Dec 13, 2022
1 parent 8de1d34 commit b39ecfd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Revit_Core_Engine/Convert/FromRevit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,12 @@ public static List<IBHoMObject> FromRevit(this Element element, Discipline disci
if (converted is IBHoMObject)
result = new List<IBHoMObject> { ((IBHoMObject)converted).IPostprocess(transform, settings) };
else if (converted is IEnumerable<IBHoMObject>)
result = new List<IBHoMObject>(((IEnumerable<IBHoMObject>)converted).Select(x => x.IPostprocess(transform, settings)));

{
result = new List<IBHoMObject>(((IEnumerable<IBHoMObject>)converted)
.Where(x => x != null)
.Select(x => x.IPostprocess(transform, settings)));
}

return result;
}

Expand Down

0 comments on commit b39ecfd

Please sign in to comment.