Skip to content

Commit

Permalink
fix(mqtt): Calling GoTo Presets should use regular strings and not js…
Browse files Browse the repository at this point in the history
…on strings

this fixes #960
  • Loading branch information
Hypfer committed May 31, 2021
1 parent 9000f51 commit ec975aa
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ class GoToLocationCapabilityMqttHandle extends CapabilityMqttHandle {
friendlyName: "Go to location preset",
datatype: DataType.STRING,
setter: async (value) => {
const id = JSON.parse(value);
const gotoPreset = this.robot.config.get("goToLocationPresets")[id];
const gotoPreset = this.robot.config.get("goToLocationPresets")[value];
if (gotoPreset === undefined) {
throw new Error("Invalid go to location preset ID found in go payload");
}
Expand Down

0 comments on commit ec975aa

Please sign in to comment.