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

In qrcode 1.5.4,react native hermes don't support TextEncoder().encode(data). #369

Open
Hao-yiwen opened this issue Aug 16, 2024 · 3 comments

Comments

@Hao-yiwen
Copy link

function ByteData (data) {
  this.mode = Mode.BYTE
  if (typeof (data) === 'string') {
    this.data = new TextEncoder().encode(data)
  } else {
    this.data = new Uint8Array(data)
  }
}

This js code can't work in react-native hermes engine. data = encodeUtf8(data) work great.

@Hao-yiwen
Copy link
Author

Hao-yiwen commented Aug 16, 2024

This is my fix pull request. #371

@freiserg
Copy link

Hermes supports TextEncoder since RN0.74 facebook/hermes#948 (comment)

@Hao-yiwen
Copy link
Author

Yes, but RN0.74 boost in April 22, 2024.So many react native app will get error when use node-qrcode.

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

No branches or pull requests

2 participants