From f55c8aba56f2f8d59b151ee964db52b418e8a171 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Mon, 15 Jan 2024 13:47:44 -0800 Subject: [PATCH] Fix request duplication --- src-web/components/Sidebar.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src-web/components/Sidebar.tsx b/src-web/components/Sidebar.tsx index 89f20f10..aebfef9c 100644 --- a/src-web/components/Sidebar.tsx +++ b/src-web/components/Sidebar.tsx @@ -646,7 +646,11 @@ const SidebarItem = forwardRef(function SidebarItem( label: 'Duplicate', hotkeyAction: 'request.duplicate', leftSlot: , - onSelect: () => duplicateRequest.mutate(), + onSelect: () => { + if (activeRequestId === itemId) { + duplicateRequest.mutate(); + } + }, }, { key: 'deleteRequest',