chore: raise error if no matching component found
This commit is contained in:
parent
781ff28abe
commit
e82006066f
1 changed files with 6 additions and 0 deletions
|
@ -39,6 +39,12 @@ export function createAstroNode(
|
||||||
props,
|
props,
|
||||||
children,
|
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 {
|
} else {
|
||||||
return {
|
return {
|
||||||
tag: node.name,
|
tag: node.name,
|
||||||
|
|
Loading…
Reference in a new issue