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.
package/dist/index.js CHANGED
@@ -1059,7 +1059,9 @@ var createStairNodeMap = (elevatorLikeRelationships, unitOpenings, options) => {
1059
1059
  const intermediaryOpeningAndLevels = intermediary.map((unitTypeAndId) => {
1060
1060
  const openings2 = unitOpenings[unitTypeAndId.id];
1061
1061
  const unit = units.find((unit2) => unit2.id === unitTypeAndId.id);
1062
+ if (!unit) return [];
1062
1063
  const level = levels.find((level2) => level2.id === unit.properties.level_id);
1064
+ if (!level) return [];
1063
1065
  return openings2.map((opening) => ({ opening, level }));
1064
1066
  }).flat();
1065
1067
  const connections = [...intermediaryOpeningAndLevels, destinationOpeningAndLevel];