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

View File

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