Skip to content

Commit

Permalink
update condition
Browse files Browse the repository at this point in the history
  • Loading branch information
apatel369 committed Nov 30, 2024
1 parent 14ba50f commit 18449c8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/astro/src/jsx/rehype.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ export const rehypeAnalyzeAstroMetadata: RehypePlugin = () => {
if (node.type !== 'mdxJsxFlowElement' && node.type !== 'mdxJsxTextElement') return;

const tagName = node.name;
if (!tagName || !isComponent(tagName)) return;
if (
!tagName ||
!isComponent(tagName) ||
!hasClientDirective(node) ||
!hasServerDeferDirective(node)
)
return;

// From this point onwards, `node` is confirmed to be an island component

Expand Down

0 comments on commit 18449c8

Please sign in to comment.