chore: raise error if no matching component found

This commit is contained in:
bholmesdev 2023-03-02 11:34:01 -05:00
parent 833a88e439
commit ad56cd95c8

View file

@ -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 <Content /> component?`
);
} else {
return {
tag: node.name,