Skip to content

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

Update PasswordGenerator.tsx

Daniel Hougaardeaa99b8d4c9c
diff --git a/frontend/src/components/v3/generic/PasswordGenerator/PasswordGenerator.tsx b/frontend/src/components/v3/generic/PasswordGenerator/PasswordGenerator.tsx
index 5ce175eabc..40c01c9166 100644
--- a/frontend/src/components/v3/generic/PasswordGenerator/PasswordGenerator.tsx
+++ b/frontend/src/components/v3/generic/PasswordGenerator/PasswordGenerator.tsx
@@ -91,6 +91,8 @@ const generateFromConstraints = (constraints: TConstraint[]): string => {
}
if (middle === undefined) {
+ middle = "";
+
const fixedLength = prefix.length + suffix.length;
const targetMin = Math.max(minLength - fixedLength, 1);
const targetMax = Math.max(maxLength - fixedLength, 1);