Fixed error with output
This commit is contained in:
parent
0557d055c4
commit
8a1ea6f029
@ -652,6 +652,10 @@ export const jsonOutput = ({
|
||||
if (typeof value === 'string') {
|
||||
// if escape is true, escape quotes and backslashes
|
||||
return escape ? value.replace(/\\/g, '\\\\').replace(/"/g, '\\"') : value
|
||||
} else if (Array.isArray(value)) {
|
||||
return escape
|
||||
? value.map(v => v.replace(/\\/g, '\\\\').replace(/"/g, '\\"'))
|
||||
: value
|
||||
}
|
||||
return value
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user