mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
update condition
This commit is contained in:
parent
14ba50f5f2
commit
18449c818d
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue