Skip to content

Commit

Permalink
Fix robot binding switching error in SceneBinding.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismbirmingham committed Dec 30, 2023
1 parent f44d5f5 commit 11d5ca0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/simulator/babylonBindings/SceneBinding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -933,9 +933,11 @@ class SceneBinding {
if (!abstractRobot) continue;

const robotBinding = this.robotBindings_[nodeId];
if (!robotBinding) throw new Error(`No robot binding for node ${nodeId}`);

ret[nodeId] = robotBinding.tick(abstractRobots[nodeId]);
if (robotBinding) {
ret[nodeId] = robotBinding.tick(abstractRobots[nodeId]);
} else {
// throw new Error(`No robot binding for node ${nodeId}`);
}
}

// Update intersections
Expand Down

0 comments on commit 11d5ca0

Please sign in to comment.