From 73af50ba20bcdcccc468cac01cf7a7815009019f Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Mon, 6 Mar 2023 12:38:34 -0500 Subject: [PATCH] fix: only validate when components is defined --- packages/integrations/markdoc/components/Renderer.astro | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/integrations/markdoc/components/Renderer.astro b/packages/integrations/markdoc/components/Renderer.astro index 4a78fda95..4fce72b04 100644 --- a/packages/integrations/markdoc/components/Renderer.astro +++ b/packages/integrations/markdoc/components/Renderer.astro @@ -7,13 +7,15 @@ import RenderNode from './RenderNode.astro'; type Props = { content: RenderableTreeNode; - components: Record; + components?: Record; }; const { content, components } = Astro.props as Props; // Will throw if components is invalid -validateComponentsProp(components); +if (components) { + validateComponentsProp(components); +} ---