mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 14:26:25 +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 copyTokenToClipboard = () => {
|
||||||
const [overrideValue, value] = getValues(["value", "valueOverride"]);
|
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();
|
setIsSecValueCopied.on();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user