From d4906ee7458e94e053082c55a1d798367227b83e Mon Sep 17 00:00:00 2001 From: dougfabris Date: Mon, 11 Nov 2024 20:10:26 -0300 Subject: [PATCH] chore: `ContactInfo` error verification order --- .../omnichannel/directory/ContactContextualBar.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/meteor/client/views/omnichannel/directory/ContactContextualBar.tsx b/apps/meteor/client/views/omnichannel/directory/ContactContextualBar.tsx index 601279f352ce..36f5f3315d6c 100644 --- a/apps/meteor/client/views/omnichannel/directory/ContactContextualBar.tsx +++ b/apps/meteor/client/views/omnichannel/directory/ContactContextualBar.tsx @@ -17,18 +17,18 @@ const ContactContextualBar = () => { const handleCancel = () => contactId && directoryRoute.push({ tab: 'contacts', context: 'details', id: contactId }); - if (!contactId) { - return ; - } - if (context === 'edit' && contactId) { return ; } - if (context === 'new') { + if (context === 'new' && !contactId) { return ; } + if (!contactId) { + return ; + } + return ; };