Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(frontend): update key generation in InlineTextDiff for unique identification

Victor Santos6df67f3d3697
diff --git a/frontend/src/components/secrets/diff/FieldDiffRenderers.tsx b/frontend/src/components/secrets/diff/FieldDiffRenderers.tsx
index cd5baa7ce7..69689f2627 100644
--- a/frontend/src/components/secrets/diff/FieldDiffRenderers.tsx
+++ b/frontend/src/components/secrets/diff/FieldDiffRenderers.tsx
@@ -45,11 +45,11 @@ export const InlineTextDiff = ({
return (
<span className={twMerge(baseClass, fontSizeClass)}>
- {changes.map((change) => {
+ {changes.map((change, index) => {
let keyPrefix = "unchanged";
if (change.added) keyPrefix = "add";
else if (change.removed) keyPrefix = "rem";
- const key = `${keyPrefix}-${change.value}`;
+ const key = `${keyPrefix}-${index}`;
if (change.added && !isOldVersion) {
return (