dmonad / lib0

Monorepo of isomorphic utility functions
MIT License
345 stars 62 forks source link

string.utf8TextEncoder.encodeInto is not a function #47

Closed ctomacheski closed 1 year ago

ctomacheski commented 1 year ago

Describe the bug

TextEncoder.encodeInto usage is not always supported, which causes errors when calling writeVarString:

.utf8TextEncoder.encodeInto is not a function.

More info:

ctomacheski commented 1 year ago

@dmonad I created a one-liner PR to fix this issue as support for iOS ≤ 14.4 is still relevant (7.6% of iPhone users worldwide are on this version as of Oct. 2022 if this source is correct).