diff --git a/src/pages/Device.tsx b/src/pages/Device.tsx index ee4ae56..0a47a05 100644 --- a/src/pages/Device.tsx +++ b/src/pages/Device.tsx @@ -128,10 +128,9 @@ export default function DevicePage() { interaction.settings.nodeOne > interaction.settings.nodeTwo && interaction.settings.nodeTwo !== 0 ) { - //flip operator and send negative comparitor to save + //flip operator to display what is actually happening interaction.settings.conditions.forEach(condition => { - //coming back from the backend as a string for some reason - if (condition.comparison.toString() === "RELATIONAL_OPERATOR_GREATER_THAN") { + if (condition.comparison === quack.RelationalOperator.RELATIONAL_OPERATOR_GREATER_THAN) { condition.comparison = quack.RelationalOperator.RELATIONAL_OPERATOR_LESS_THAN; } else { condition.comparison = quack.RelationalOperator.RELATIONAL_OPERATOR_GREATER_THAN;