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

Why not use TextDecoder in browser? #157

Closed
ChALkeR opened this issue Feb 17, 2021 · 1 comment · Fixed by #161
Closed

Why not use TextDecoder in browser? #157

ChALkeR opened this issue Feb 17, 2021 · 1 comment · Fixed by #161

Comments

@ChALkeR
Copy link

ChALkeR commented Feb 17, 2021

These lines apparently set TEXT_ENCODING_AVAILABLE to false in browsers, as process is not defined:

const TEXT_ENCODING_AVAILABLE =
typeof process !== "undefined" &&
process.env.TEXT_ENCODING !== "never" &&
typeof TextEncoder !== "undefined" &&
typeof TextDecoder !== "undefined";

Is that intended? If yes, why?

Refs: #33.

@gfx
Copy link
Member

gfx commented Mar 1, 2021

Thanks. It was not intended and I've fixed it in v2.4.1.

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 a pull request may close this issue.

2 participants