mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-24 17:03:47 +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 hasNewLines = value.includes('\n');
|
||||
const hasNewLines = value?.includes('\n');
|
||||
|
||||
if (!hasNewLines) {
|
||||
return value;
|
||||
@ -261,7 +261,6 @@ ${indentString(body.sparql)}
|
||||
multipartForms
|
||||
.map((item) => {
|
||||
const enabled = item.enabled ? '' : '~';
|
||||
|
||||
if (item.type === 'text') {
|
||||
return `${enabled}${item.name}: ${getValueString(item.value)}`;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user