Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(client): Fix text encoding polyfill being fed numbers #1204

Merged
merged 4 commits into from
Apr 29, 2024

Conversation

msfstef
Copy link
Contributor

@msfstef msfstef commented Apr 29, 2024

Addressing issue raised in discord

The TextEncoderLite polyfill for the TextEncoder does not coerce its input to a string, and we force cast numbers with as string in the encoding stage, resulting in the input being encoded as an empty bytearray.

This does mean that the polyfill does not have the exact same behaviour as the original (which it should), but the immediate solution is to respect types and not force cast to a string when it isn't.

clients/typescript/src/satellite/client.ts Outdated Show resolved Hide resolved
@msfstef msfstef merged commit 244066a into main Apr 29, 2024
8 checks passed
@msfstef msfstef deleted the msfstef/fix-text-encoding-polyfill branch April 29, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants