From 32d830440a0a29af6580c1ab3b5ea6384e8ad54d Mon Sep 17 00:00:00 2001
From: Chris Tozlowski <43322634+ctozlowski@users.noreply.github.com>
Date: Fri, 12 Jul 2024 11:20:44 -0400
Subject: [PATCH] Fix the position of the separator in the operator menu when
 editing a rule (#3037)

* Fix line separator position in operations menu

* release note
---
 packages/desktop-client/src/components/modals/EditRule.jsx | 2 +-
 upcoming-release-notes/3037.md                             | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 upcoming-release-notes/3037.md

diff --git a/packages/desktop-client/src/components/modals/EditRule.jsx b/packages/desktop-client/src/components/modals/EditRule.jsx
index 86044e64c..8c14b40c1 100644
--- a/packages/desktop-client/src/components/modals/EditRule.jsx
+++ b/packages/desktop-client/src/components/modals/EditRule.jsx
@@ -122,7 +122,7 @@ export function OpSelect({
       .map(op => [op, formatOp(op, type)]);
 
     if (type === 'string' || type === 'id') {
-      options.splice(options.length / 2, 0, Menu.line);
+      options.splice(Math.ceil(options.length / 2), 0, Menu.line);
     }
 
     return options;
diff --git a/upcoming-release-notes/3037.md b/upcoming-release-notes/3037.md
new file mode 100644
index 000000000..3b29eb65a
--- /dev/null
+++ b/upcoming-release-notes/3037.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [ctozlowski]
+---
+
+Fix the position of the separator in the operator menu when editing a rule
\ No newline at end of file
-- 
GitLab