Skip to content

Commit 24013c5

Browse files
committed
fix: solved utf88Encode of empty string
1 parent 1f3a224 commit 24013c5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/util.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ const utf8Encode = (val) => {
66
}
77

88
const utf8Decode = (val) => {
9+
if (val === '') {
10+
return val
11+
}
912
return new util.TextDecoder("utf-8").decode(val)
1013
}
1114

0 commit comments

Comments
 (0)