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.
@@ -1021,7 +1021,9 @@ var createStairNodeMap = (elevatorLikeRelationships, unitOpenings, options) => {
1021
1021
  const intermediaryOpeningAndLevels = intermediary.map((unitTypeAndId) => {
1022
1022
  const openings2 = unitOpenings[unitTypeAndId.id];
1023
1023
  const unit = units.find((unit2) => unit2.id === unitTypeAndId.id);
1024
+ if (!unit) return [];
1024
1025
  const level = levels.find((level2) => level2.id === unit.properties.level_id);
1026
+ if (!level) return [];
1025
1027
  return openings2.map((opening) => ({ opening, level }));
1026
1028
  }).flat();
1027
1029
  const connections = [...intermediaryOpeningAndLevels, destinationOpeningAndLevel];