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:
Chae Jeong Ah 2024-08-06 16:13:47 +09:00 committed by GitHub
parent 12fdbbb291
commit aa4bcdca9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)}`;
} }