diff --git a/frontend/src/lib/components/VariableEditor.svelte b/frontend/src/lib/components/VariableEditor.svelte index 6095419f6c..765f3be565 100644 --- a/frontend/src/lib/components/VariableEditor.svelte +++ b/frontend/src/lib/components/VariableEditor.svelte @@ -458,13 +458,10 @@ path: ini.path, requestBody: { path: ini.path != s.path ? s.path : undefined, - // An empty value keeps the stored one, except when it replaces a - // reference: the reference is then dropped for the empty value. + // An empty value keeps the stored one only while the baseline is empty too + // (a secret never loaded): clearing a value or reference that was shown saves it empty. value: - s.variable.value == '' && - !(isExternalRef(ini.variable.value) && !isExternalRef(s.variable.value)) - ? undefined - : s.variable.value, + s.variable.value == '' && ini.variable.value == '' ? undefined : s.variable.value, is_secret: ini.variable.is_secret != s.variable.is_secret ? s.variable.is_secret : undefined, description: