fix: cant find zod for some reason

This commit is contained in:
bholmesdev 2023-03-03 09:59:32 -05:00
parent dcd4ed138b
commit 1b473e5433

View file

@ -2,7 +2,7 @@ import type { AstroInstance } from 'astro';
import type { RenderableTreeNode } from '@markdoc/markdoc';
import Markdoc from '@markdoc/markdoc';
import { MarkdocError } from '../dist/utils.js';
import z, { ZodError } from 'zod';
import z from 'astro/zod';
export type AstroNode =
| string
@ -74,7 +74,7 @@ function validateComponents(components: Record<string, AstroInstance['default']>
} catch (e) {
throw new MarkdocError({
message:
e instanceof ZodError
e instanceof z.ZodError
? e.issues[0].message
: 'Invalid `components` prop. Ensure you are passing an object of components to <Content />',
});