mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-25 01:14:23 +01:00
fix: type error in jsonToBru during import collection (#2761)
* fix: add optional chaining to prevent type error * fix: remove debug code
This commit is contained in:
parent
12fdbbb291
commit
aa4bcdca9b
@ -13,7 +13,7 @@ const stripLastLine = (text) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getValueString = (value) => {
|
const getValueString = (value) => {
|
||||||
const hasNewLines = value.includes('\n');
|
const hasNewLines = value?.includes('\n');
|
||||||
|
|
||||||
if (!hasNewLines) {
|
if (!hasNewLines) {
|
||||||
return value;
|
return value;
|
||||||
@ -261,7 +261,6 @@ ${indentString(body.sparql)}
|
|||||||
multipartForms
|
multipartForms
|
||||||
.map((item) => {
|
.map((item) => {
|
||||||
const enabled = item.enabled ? '' : '~';
|
const enabled = item.enabled ? '' : '~';
|
||||||
|
|
||||||
if (item.type === 'text') {
|
if (item.type === 'text') {
|
||||||
return `${enabled}${item.name}: ${getValueString(item.value)}`;
|
return `${enabled}${item.name}: ${getValueString(item.value)}`;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user