Skip to content

Commit 0654785

Browse files
committed
fix: handle null values
1 parent 85d5015 commit 0654785

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ const runes = require('runes');
44
const stringLength = require('string-length');
55

66
module.exports = (str, {size, unicodeAware = false}) => {
7+
str = str || '';
8+
79
if (!unicodeAware) {
810
return getChunks(str, size);
911
}

0 commit comments

Comments
 (0)