Skip to content

Commit

Permalink
Fix empty texts
Browse files Browse the repository at this point in the history
  • Loading branch information
jordisala1991 committed May 27, 2024
1 parent 35d9d47 commit 986daa4
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions plugin-src/transformers/partials/transformText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,21 @@ export const transformText = async (node: TextNode): Promise<Partial<TextShape>>
content: {
type: 'root',
verticalAlign: translateVerticalAlign(node.textAlignVertical),
children: [
{
type: 'paragraph-set',
children: [
children: styledTextSegments.length
? [
{
type: 'paragraph',
children: await translateStyleTextSegments(node, styledTextSegments),
...(styledTextSegments.length ? transformTextStyle(node, styledTextSegments[0]) : {}),
...(await transformFills(node))
type: 'paragraph-set',
children: [
{
type: 'paragraph',
children: await translateStyleTextSegments(node, styledTextSegments),
...transformTextStyle(node, styledTextSegments[0]),
...(await transformFills(node))
}
]
}
]
}
]
: undefined
},
growType: translateGrowType(node)
};
Expand Down

0 comments on commit 986daa4

Please sign in to comment.