From ad56cd95c8705b8cdec38ea02b8240d7bc905ba9 Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Thu, 2 Mar 2023 11:34:01 -0500 Subject: [PATCH] chore: raise error if no matching component found --- packages/integrations/markdoc/components/astroNode.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/integrations/markdoc/components/astroNode.ts b/packages/integrations/markdoc/components/astroNode.ts index bd7bc5e03..5924bcb2e 100644 --- a/packages/integrations/markdoc/components/astroNode.ts +++ b/packages/integrations/markdoc/components/astroNode.ts @@ -39,6 +39,12 @@ export function createAstroNode( props, children, }; + } else if (isCapitalized(node.name)) { + throw new Error( + `[Markdoc] Unable to render ${JSON.stringify( + node.name + )}. Did you add this to the "components" prop on your component?` + ); } else { return { tag: node.name,