fix bug where the operator wasn't being flipped where it was supposed to

This commit is contained in:
csawatzky 2026-01-19 09:49:12 -06:00
parent d23d1d6ed3
commit 89d5e40d45

View file

@ -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;