diff --git a/plugin-src/transformers/transformVectorNode.ts b/plugin-src/transformers/transformVectorNode.ts index 8efe8190..33f4c7b6 100644 --- a/plugin-src/transformers/transformVectorNode.ts +++ b/plugin-src/transformers/transformVectorNode.ts @@ -8,15 +8,17 @@ import { transformGroupNodeLike, transformPathNode } from '.'; /* * Vector nodes can have multiple vector paths, each with its own fills. * - * If the fills are not mixed, we treat it like a normal `PathShape`. - * If the fills are mixed, we treat the vector node as a `GroupShape` with multiple `PathShape` children. + * If there are no regions on the vector network, we treat it like a normal `PathShape`. + * If there are regions, we treat the vector node as a `GroupShape` with multiple `PathShape` children. */ export const transformVectorNode = async ( node: VectorNode, baseX: number, baseY: number ): Promise => { - if (node.fills !== figma.mixed) return transformPathNode(node, baseX, baseY); + if ((node.vectorNetwork.regions ?? []).length === 0) { + return transformPathNode(node, baseX, baseY); + } return { ...transformGroupNodeLike(node, baseX, baseY),