mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 22:18:33 +00:00
Feature: Object Variable Interpolation (#6317)
* Added JSON stringify for object values to allow for proper display Added styling changes to accommodate objects * Switching to a multi line approach
This commit is contained in:
@@ -91,9 +91,20 @@ const getMaskedDisplay = (value) => {
|
||||
const updateValueDisplay = (valueDisplay, value, isSecret, isMasked, isRevealed) => {
|
||||
if ((isSecret || isMasked) && !isRevealed) {
|
||||
valueDisplay.textContent = getMaskedDisplay(value);
|
||||
} else {
|
||||
valueDisplay.textContent = value || '';
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof value === 'object') {
|
||||
valueDisplay.textContent = value === null ? 'null' : JSON.stringify(value, null, 2);
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof value === 'undefined' || value === undefined) {
|
||||
valueDisplay.textContent = '';
|
||||
return;
|
||||
}
|
||||
|
||||
valueDisplay.textContent = value;
|
||||
};
|
||||
|
||||
// Check if the raw value contains references to secret variables
|
||||
|
||||
Reference in New Issue
Block a user