Skip to content

Commit a14f0c3

Browse files
committed
fix: works with null lines
1 parent 54a9253 commit a14f0c3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/utils.js

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ const stripColors = (text) => {
4242
};
4343

4444
const len = (text, ignoreColors=false) => {
45+
if (!text) {
46+
return 0;
47+
}
4548
if (ignoreColors) {
4649
return text.length;
4750
}

0 commit comments

Comments
 (0)