refactor(editor): Enable @typescript-eslint/no-base-to-string lint rule, fix errors (no-changelog) (#9783)

This commit is contained in:
Elias Meire
2024-06-18 15:04:29 +02:00
committed by GitHub
parent e3cbce5028
commit 7e44cd7f16
6 changed files with 17 additions and 8 deletions

View File

@@ -97,7 +97,9 @@ export function getMappedResult(
} else if (typeof prevValue === 'string' && isExpression(prevValue) && prevValue.length > 1) {
return `${prevValue} ${newParamValue}`;
} else if (prevValue && ['string', 'json'].includes(parameter.type)) {
return prevValue === '=' ? `=${newParamValue}` : `=${prevValue} ${newParamValue}`;
return prevValue === '=' || typeof prevValue === 'object'
? `=${newParamValue}`
: `=${prevValue} ${newParamValue}`;
}
return `=${newParamValue}`;