Skip to content

Commit

Permalink
Fix DocNavbarItem error message
Browse files Browse the repository at this point in the history
  • Loading branch information
serut authored Apr 2, 2021
1 parent 9fceeb9 commit 1ee0dcc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ export default function DocNavbarItem({

const doc = version.docs.find((versionDoc) => versionDoc.id === docId);
if (!doc) {
const docIds = version.docs.map((doc) => {return doc.id}).join('\n- ')
throw new Error(
`DocNavbarItem: couldn't find any doc with id=${docId} in version ${
version.name
}.
Available docIds=\n- ${version.docs.join('\n- ')}`,
Available docIds=\n- ${docIds}`,
);
}

Expand Down

0 comments on commit 1ee0dcc

Please sign in to comment.