Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/fix_440' into convert-to-es-cl…
Browse files Browse the repository at this point in the history
…asses

* upstream/fix_440:
  Fix RobotWebTools#440, correctly delete old grid
  Add missing semi-colon
  Update Build
  Bump rollup from 2.56.3 to 2.57.0 (RobotWebTools#443)
  Bump mocha from 9.1.1 to 9.1.2 (RobotWebTools#442)
  Bump @rollup/plugin-node-resolve from 13.0.4 to 13.0.5 (RobotWebTools#441)
  • Loading branch information
trusktr committed Oct 1, 2021
2 parents f56c58a + d36de81 commit 73ec84d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/navigation/OccupancyGridClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,13 @@ export class OccupancyGridClient extends EventEmitter2 {
// check for an old map
if (this.currentGrid) {
// check if it there is a tf client
if (this.currentGrid.tfClient) {
if (this.tfClient) {
// grid is of type ROS3D.SceneNode
this.currentGrid.unsubscribeTf();
this.sceneNode.unsubscribeTf();
this.sceneNode.remove(this.currentGrid);
} else {
this.rootObject.remove(this.currentGrid);
}
this.sceneNode.remove(this.currentGrid);
this.currentGrid.dispose();
}

Expand Down

0 comments on commit 73ec84d

Please sign in to comment.