mudlet-map-renderer 0.0.21 → 0.0.22

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/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.0.22
2
+ - handle not existing paths
3
+
1
4
  # 0.0.21
2
5
  - fixes in special links to other areas
3
6
  - add controls for paths
@@ -160,7 +160,10 @@ class Controls {
160
160
  }
161
161
 
162
162
  renderPath(from, to, color) {
163
- return this.renderer.renderPath(this.pathFinder.path(from, to).map(number => parseInt(number)), color)
163
+ let rooms = this.pathFinder.path(from, to)?.map(number => parseInt(number));
164
+ if (rooms) {
165
+ return this.renderer.renderPath(rooms, color);
166
+ }
164
167
  }
165
168
  }
166
169
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mudlet-map-renderer",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "keywords": [
5
5
  "mudlet",
6
6
  "map",