Skip to content

Commit 30a8434

Browse files
committed
fix: increment index in parseColoredTextUtil to handle empty words
1 parent 255d144 commit 30a8434

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/shared/utils/misc/parse-colored-text.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ export function parseColoredTextUtil(text: string): Array<{ color: string; text:
4848
if (word) {
4949
parts.push({ text: word, color })
5050
}
51+
} else {
52+
i++
5153
}
5254
}
5355

0 commit comments

Comments
 (0)