forked from extern/bruno
Merge pull request #288 from Cibico99/feature/xml-format-option-fix
Fix for XML Formatting Options
This commit is contained in:
commit
55315b5b88
@ -51,12 +51,12 @@ export const safeStringifyJSON = (obj, indent = false) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const safeParseXML = (str) => {
|
||||
export const safeParseXML = (str, options) => {
|
||||
if (!str || !str.length || typeof str !== 'string') {
|
||||
return str;
|
||||
}
|
||||
try {
|
||||
return xmlFormat(str);
|
||||
return xmlFormat(str, options);
|
||||
} catch (e) {
|
||||
return str;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user