Skip to content

Commit

Permalink
fix(mqtt): Allow strings as segment IDs (#891)
Browse files Browse the repository at this point in the history
Fixes #889
  • Loading branch information
depau committed May 3, 2021
1 parent 8035004 commit 3e30414
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MapSegmentationCapabilityMqttHandle extends CapabilityMqttHandle {
const robotSegments = await this.capability.getSegments();
const segments = [];
for (const id of reqSegments) {
const segment = robotSegments.find(segm => parseInt(segm.id) === id);
const segment = robotSegments.find(segm => (segm.id === id || parseInt(segm.id) === id));
if (!segment) {
throw new Error(`Segment ID does not exist, or map was not loaded: ${id}`);
}
Expand Down

0 comments on commit 3e30414

Please sign in to comment.