fix: cant find zod for some reason
This commit is contained in:
parent
dcd4ed138b
commit
1b473e5433
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@ import type { AstroInstance } from 'astro';
|
||||||
import type { RenderableTreeNode } from '@markdoc/markdoc';
|
import type { RenderableTreeNode } from '@markdoc/markdoc';
|
||||||
import Markdoc from '@markdoc/markdoc';
|
import Markdoc from '@markdoc/markdoc';
|
||||||
import { MarkdocError } from '../dist/utils.js';
|
import { MarkdocError } from '../dist/utils.js';
|
||||||
import z, { ZodError } from 'zod';
|
import z from 'astro/zod';
|
||||||
|
|
||||||
export type AstroNode =
|
export type AstroNode =
|
||||||
| string
|
| string
|
||||||
|
@ -74,7 +74,7 @@ function validateComponents(components: Record<string, AstroInstance['default']>
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new MarkdocError({
|
throw new MarkdocError({
|
||||||
message:
|
message:
|
||||||
e instanceof ZodError
|
e instanceof z.ZodError
|
||||||
? e.issues[0].message
|
? e.issues[0].message
|
||||||
: 'Invalid `components` prop. Ensure you are passing an object of components to <Content />',
|
: 'Invalid `components` prop. Ensure you are passing an object of components to <Content />',
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue