mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
Initial changes to error messages
This commit is contained in:
parent
e285f93c1b
commit
b256d2f8d9
7 changed files with 45 additions and 6 deletions
|
@ -128,6 +128,12 @@ class HeaderNav extends React.Component {
|
|||
"-" +
|
||||
link.doc;
|
||||
}
|
||||
if (!Metadata[id]) {
|
||||
throw new Error(
|
||||
"A headerLink is specified with a document that does not exist. No document exists with id: " +
|
||||
link.doc
|
||||
);
|
||||
}
|
||||
href = this.props.config.baseUrl + Metadata[id].permalink;
|
||||
} else if (link.page) {
|
||||
if (fs.existsSync(CWD + "/pages/en/" + link.page + ".js")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue