Merge pull request #4693 from pooja-bruno/mv/isValidValue-in-common-file

Fixed a bug causing secrets to appear as null instead of an empty value.

rm isValidValue and directly handle it in encryptString and `decryptString` function
This commit is contained in:
Pooja
2025-06-09 13:50:25 +05:30
committed by GitHub
parent 3d26833b8a
commit e4ae857df3
7 changed files with 32 additions and 24 deletions

View File

@@ -83,7 +83,7 @@ class SingleLineEditor extends Component {
}
});
}
this.editor.setValue(String(this.props.value) || '');
this.editor.setValue(String(this.props.value ?? ''));
this.editor.on('change', this._onEdit);
this.addOverlay(variables);
this._enableMaskedEditor(this.props.isSecret);
@@ -129,7 +129,7 @@ class SingleLineEditor extends Component {
}
if (this.props.value !== prevProps.value && this.props.value !== this.cachedValue && this.editor) {
this.cachedValue = String(this.props.value);
this.editor.setValue(String(this.props.value) || '');
this.editor.setValue(String(this.props.value ?? ''));
}
if (!isEqual(this.props.isSecret, prevProps.isSecret)) {
// If the secret flag has changed, update the editor to reflect the change