-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Fix the use of empty styledTextSegments array (#31)
When a TextNode contains empty characters field, getStyledTextSegments returns empty array. This causes a TypeError, when we try to access the properties of the first element of this array. This change adds a check if the first element of the styledTextSegments exists before using its properties. Signed-off-by: Roma <[email protected]>
- Loading branch information
Showing
1 changed file
with
18 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters