From 1ace8eebf8e4b93109594d9baea9a8b28b58976f Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Thu, 12 Dec 2024 03:27:07 +0400 Subject: [PATCH] fix(k8s): dynamic secret bugs --- frontend/src/helpers/parseEnvVar.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/helpers/parseEnvVar.ts b/frontend/src/helpers/parseEnvVar.ts index 6b056d5e9..d2e39899e 100644 --- a/frontend/src/helpers/parseEnvVar.ts +++ b/frontend/src/helpers/parseEnvVar.ts @@ -15,7 +15,10 @@ export const getKeyValue = (pastedContent: string, delimiters: string[]) => { } }); - if (firstDelimiterIndex === -1) { + // Check if there's any content after the delimiter + const hasValueAfterDelimiter = pastedContent.length > firstDelimiterIndex + foundDelimiter.length; + + if (firstDelimiterIndex === -1 || !hasValueAfterDelimiter) { return { key: pastedContent.trim(), value: "" }; }