From c9f01ce0867caa09ffb04f389c3a4627d7f00ef3 Mon Sep 17 00:00:00 2001 From: Shreyas Singh Date: Sun, 29 Oct 2023 21:25:36 +0530 Subject: [PATCH] Fix bug with copying secret to clipboard with an override --- .../SecretMainPage/components/SecretListView/SecretItem.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/SecretMainPage/components/SecretListView/SecretItem.tsx b/frontend/src/views/SecretMainPage/components/SecretListView/SecretItem.tsx index c420cdd07..9c92ae6b8 100644 --- a/frontend/src/views/SecretMainPage/components/SecretListView/SecretItem.tsx +++ b/frontend/src/views/SecretMainPage/components/SecretListView/SecretItem.tsx @@ -172,7 +172,11 @@ export const SecretItem = memo( const copyTokenToClipboard = () => { const [overrideValue, value] = getValues(["value", "valueOverride"]); - navigator.clipboard.writeText((overrideValue || value) as string); + if (isOverriden) { + navigator.clipboard.writeText(value as string); + } else { + navigator.clipboard.writeText(overrideValue as string); + } setIsSecValueCopied.on(); };