Initial changes to error messages

This commit is contained in:
Frank Li 2017-08-09 15:43:30 -07:00
parent e285f93c1b
commit b256d2f8d9
7 changed files with 45 additions and 6 deletions

View file

@ -32,7 +32,12 @@ if (fs.existsSync(CWD + "/languages.js")) {
}
function readSidebar() {
let allSidebars = require(CWD + "/sidebars.json");
let allSidebars;
if (fs.existsSync(CWD + "/sidebars.json")) {
allSidebars = require(CWD + "/sidebars.json");
} else {
allSidebars = {};
}
Object.assign(allSidebars, versionFallback.sidebarData());
const order = {};
@ -155,7 +160,7 @@ function processMetadata(file) {
metadata.previous = language + "-" + order[id].previous;
}
}
return { metadata, rawContent: rawContent };
}