Make abstract optional
This commit is contained in:
parent
c6180ae95c
commit
55dc7cfbfa
|
@ -7,7 +7,7 @@ var showdown = require("showdown");
|
|||
const converterShowdown = new showdown.Converter();
|
||||
const xmlJs = require("xml-js");
|
||||
|
||||
fs.readFile("./events-test.xml", "utf8", (err, data) => {
|
||||
fs.readFile("./events.xml", "utf8", (err, data) => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
return;
|
||||
|
@ -70,7 +70,7 @@ const parseXML = (XML) => {
|
|||
const online = location.toLowerCase() === "online" ? true : false;
|
||||
let abstract = "undefined";
|
||||
if (js.elements[0].elements[i].elements[1] === undefined) {
|
||||
console.error(`${title}, ${currentTerm} has no abstract`);
|
||||
abstract = short;
|
||||
} else {
|
||||
abstract = converterShowdown.makeMarkdown(
|
||||
xmlJs.js2xml(js.elements[0].elements[i].elements[1])
|
||||
|
|
Loading…
Reference in New Issue