mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 08:07:26 +02:00
Provide a more useful error in event someone tries to build site but hasn't provided localized files
This commit is contained in:
parent
f48ff77322
commit
e71b4d902e
1 changed files with 7 additions and 0 deletions
|
@ -136,6 +136,13 @@ class HeaderNav extends React.Component {
|
||||||
link.doc;
|
link.doc;
|
||||||
}
|
}
|
||||||
if (!Metadata[id]) {
|
if (!Metadata[id]) {
|
||||||
|
if (id != link.doc) {
|
||||||
|
throw new Error(
|
||||||
|
"It looks like you've enabled language support, but haven't provided translated files. The document with id: '" +
|
||||||
|
id +
|
||||||
|
"' doesn't exist."
|
||||||
|
);
|
||||||
|
}
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"A headerLink is specified with a document that does not exist. No document exists with id: " +
|
"A headerLink is specified with a document that does not exist. No document exists with id: " +
|
||||||
link.doc
|
link.doc
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue