File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -12,25 +12,14 @@ const props = z.object({
1212
1313let { file, product, params } = props .parse (Astro .props );
1414
15- if (! product ) {
16- const fromSlug = Astro .params .slug ?.split (" /" )[0 ];
17-
18- if (! fromSlug ) {
19- throw new Error (
20- ` [Render] Unable to infer which folder ${file } is in, please provide a "product" input with your "file" input. ` ,
21- );
22- }
23-
24- product = fromSlug ;
25- }
26-
2715const id = ` ${product }/${file } ` ;
28- const partial = await getEntry (" partials" , id );
16+ let partial = await getEntry (" partials" , id );
2917
3018if (! partial ) {
31- throw new Error (
19+ console . warn (
3220 ` [Render] Couldn't find "${id }" included on "${Astro .url .pathname }" ` ,
3321 );
22+ partial = await getEntry (" partials" , " agents/unique-agents" );
3423}
3524
3625// We currently only enforce parameters if `params` is set in the frontmatter,
You can’t perform that action at this time.
0 commit comments