From 89d5e40d4555838b41c62efd95c5f934637e60a3 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Mon, 19 Jan 2026 09:49:12 -0600 Subject: [PATCH] fix bug where the operator wasn't being flipped where it was supposed to --- src/pages/Device.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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;