Remove too strict check

This commit is contained in:
Leandro Facchinetti 2020-03-31 16:29:16 -04:00
parent e212793337
commit 8b36080587
2 changed files with 1 additions and 3 deletions

View File

@ -7,7 +7,7 @@ for (const feed of fs
try {
const xml: any = xmlbuilder2.convert(
fs.readFileSync(`static/feeds/${feed}`, "utf8"),
{ format: "object", wellFormed: true }
{ format: "object" }
);
if (xml?.feed?.updated === undefined)
throw new Error("Cant find xml.feed.updated");

View File

@ -298,7 +298,6 @@ function renderHTML(component: React.ReactElement): string {
function renderXML(xml: object): string {
return xmlbuilder2.convert({ invalidCharReplacement: "" }, xml, {
format: "xml",
wellFormed: true,
noDoubleEncoding: true,
prettyPrint: true
});
@ -307,7 +306,6 @@ function renderXML(xml: object): string {
function parseXML(xml: string): any {
return xmlbuilder2.convert({ invalidCharReplacement: "" }, xml, {
format: "object",
wellFormed: true,
noDoubleEncoding: true
});
}