mirror of
https://github.com/Infisical/infisical.git
synced 2025-04-17 19:37:38 +00:00
Fix bug with copying secret to clipboard with an override
This commit is contained in:
@ -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();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user