Make abstract optional

This commit is contained in:
Jared He 2021-06-14 00:00:44 -05:00
parent c6180ae95c
commit 55dc7cfbfa
1 changed files with 2 additions and 2 deletions

View File

@ -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])