mirror of
https://github.com/usebruno/bruno.git
synced 2024-12-25 16:18:56 +01:00
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