mirror of https://github.com/FlowiseAI/Flowise.git
Fix JSON escaping (#2461)
parent
50c53de296
commit
82899d9d5d
|
|
@ -780,7 +780,7 @@ export const getVariableValue = (
|
||||||
const variableValue = variableDict[path]
|
const variableValue = variableDict[path]
|
||||||
// Replace all occurrence
|
// Replace all occurrence
|
||||||
if (typeof variableValue === 'object') {
|
if (typeof variableValue === 'object') {
|
||||||
returnVal = returnVal.split(path).join(JSON.stringify(variableValue).replace(/"/g, '\\"'))
|
returnVal = returnVal.split(path).join(JSON.stringify(variableValue).replaceAll('"', '\\"').replaceAll('\\n', '\\\\n'))
|
||||||
} else {
|
} else {
|
||||||
returnVal = returnVal.split(path).join(variableValue)
|
returnVal = returnVal.split(path).join(variableValue)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"lib": ["es2017"],
|
"lib": ["es2021"],
|
||||||
"target": "es2017" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
"target": "es2021" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
||||||
"experimentalDecorators": true /* Enable experimental support for TC39 stage 2 draft decorators. */,
|
"experimentalDecorators": true /* Enable experimental support for TC39 stage 2 draft decorators. */,
|
||||||
"emitDecoratorMetadata": true /* Emit design-type metadata for decorated declarations in source files. */,
|
"emitDecoratorMetadata": true /* Emit design-type metadata for decorated declarations in source files. */,
|
||||||
"module": "commonjs" /* Specify what module code is generated. */,
|
"module": "commonjs" /* Specify what module code is generated. */,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue