Skip to content

Commit 465d179

Browse files
committed
fix(storage, other): work around missing TextEncoder implementation
1 parent e94ea29 commit 465d179

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/storage/lib/web/RNFBStorageModule.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,7 @@ export default {
353353
break;
354354
}
355355

356-
const encoder = new TextEncoder();
357-
358-
const arrayBuffer = encoder.encode(decodedString).buffer;
356+
const arrayBuffer = new Uint8Array([...decodedString].map(c => c.charCodeAt(0)));
359357

360358
const task = uploadBytesResumable(ref, arrayBuffer, {
361359
...makeSettableMetadata(metadata),

0 commit comments

Comments
 (0)