Fix bug with copying secret to clipboard with an override

This commit is contained in:
Shreyas Singh
2023-10-29 21:25:36 +05:30
parent bc43e109eb
commit c9f01ce086

View File

@ -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();
};