venue-js 1.4.0-next.22 → 1.4.0-next.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -973,7 +973,9 @@ var createStairNodeMap = (elevatorLikeRelationships, unitOpenings, options) => {
973
973
  const intermediaryOpeningAndLevels = intermediary.map((unitTypeAndId) => {
974
974
  const openings2 = unitOpenings[unitTypeAndId.id];
975
975
  const unit = units.find((unit2) => unit2.id === unitTypeAndId.id);
976
+ if (!unit) return [];
976
977
  const level = levels.find((level2) => level2.id === unit.properties.level_id);
978
+ if (!level) return [];
977
979
  return openings2.map((opening) => ({ opening, level }));
978
980
  }).flat();
979
981
  const connections = [...intermediaryOpeningAndLevels, destinationOpeningAndLevel];