mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
fix(v2): fixing typo in error message (#3441)
This commit is contained in:
parent
306122e3b1
commit
8a437961f6
2 changed files with 2 additions and 2 deletions
|
@ -354,7 +354,7 @@ describe('simple site', () => {
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}).toThrowErrorMatchingInlineSnapshot(
|
}).toThrowErrorMatchingInlineSnapshot(
|
||||||
`"The docs homepage (homePageId=homePageId) is not allowed to have a frontmatter slug=/x/y => you have to chooser either homePageId or slug, not both"`,
|
`"The docs homepage (homePageId=homePageId) is not allowed to have a frontmatter slug=/x/y => you have to choose either homePageId or slug, not both"`,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -142,7 +142,7 @@ export function processDocMetadata({
|
||||||
const isDocsHomePage = unversionedId === (homePageId ?? '_index');
|
const isDocsHomePage = unversionedId === (homePageId ?? '_index');
|
||||||
if (frontMatter.slug && isDocsHomePage) {
|
if (frontMatter.slug && isDocsHomePage) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`The docs homepage (homePageId=${homePageId}) is not allowed to have a frontmatter slug=${frontMatter.slug} => you have to chooser either homePageId or slug, not both`,
|
`The docs homepage (homePageId=${homePageId}) is not allowed to have a frontmatter slug=${frontMatter.slug} => you have to choose either homePageId or slug, not both`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue