From 8a437961f6fbbd74dc95dbb6469e11cad132b065 Mon Sep 17 00:00:00 2001 From: Nahiyan Kamal Date: Fri, 11 Sep 2020 20:33:08 +0200 Subject: [PATCH] fix(v2): fixing typo in error message (#3441) --- .../docusaurus-plugin-content-docs/src/__tests__/docs.test.ts | 2 +- packages/docusaurus-plugin-content-docs/src/docs.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus-plugin-content-docs/src/__tests__/docs.test.ts b/packages/docusaurus-plugin-content-docs/src/__tests__/docs.test.ts index 60695636408f..34eedbe9cdfe 100644 --- a/packages/docusaurus-plugin-content-docs/src/__tests__/docs.test.ts +++ b/packages/docusaurus-plugin-content-docs/src/__tests__/docs.test.ts @@ -354,7 +354,7 @@ describe('simple site', () => { }), ); }).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"`, ); }); }); diff --git a/packages/docusaurus-plugin-content-docs/src/docs.ts b/packages/docusaurus-plugin-content-docs/src/docs.ts index e10e19bc7a52..f6c931b955ac 100644 --- a/packages/docusaurus-plugin-content-docs/src/docs.ts +++ b/packages/docusaurus-plugin-content-docs/src/docs.ts @@ -142,7 +142,7 @@ export function processDocMetadata({ const isDocsHomePage = unversionedId === (homePageId ?? '_index'); if (frontMatter.slug && isDocsHomePage) { 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`, ); }