Skip to content

Commit 8d0d1b7

Browse files
ncavealfonsogarciacaro
authored andcommitted
Fixed Encoding
1 parent b7f8fcb commit 8d0d1b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/fable-library/Encoding.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ class UTF16LE {
127127

128128
class UTF8 {
129129

130-
public getBytes(str: string, index?: number, count?: number) {
130+
public getBytes(str: string | string[], index?: number, count?: number) {
131+
str = Array.isArray(str) ? str.join("") : str;
131132
if (index != null && count != null) {
132133
str = str.substring(index, index + count);
133134
} else if (index != null) {

0 commit comments

Comments
 (0)