From 3f9189c7c1accf2b738b2901fdd1ef85a1765ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20S=C3=A1nchez?= Date: Mon, 3 Jun 2024 10:06:18 +0200 Subject: [PATCH] Filtering design system nodes (#130) * filtering design system nodes * Delete .changeset/eight-berries-hunt.md --- plugin-src/transformers/transformInstanceNode.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin-src/transformers/transformInstanceNode.ts b/plugin-src/transformers/transformInstanceNode.ts index 4850c22..de3ee5d 100644 --- a/plugin-src/transformers/transformInstanceNode.ts +++ b/plugin-src/transformers/transformInstanceNode.ts @@ -24,9 +24,10 @@ export const transformInstanceNode = async ( * We do not want to process component instances in the following scenarios: * * 1. If the component does not have a main component. - * 2. If the component does not have parent (it comes from an external design system). + * 2. If the component comes from an external design system. + * 3. If th component does not have a parent. (it's been removed) */ - if (!mainComponent || mainComponent.parent === null) { + if (!mainComponent || mainComponent.remote || mainComponent.parent === null) { return; }