Skip to content

fix: TextDecoder in parseJsonStream's global scope causes unsupported… - #4480

Closed
ItsWendell wants to merge 1 commit into
trpc:mainfrom
ItsWendell:ItsWendell-patch-1
Closed

ItsWendell wants to merge 1 commit into
trpc:mainfrom
ItsWendell:ItsWendell-patch-1

Conversation

@ItsWendell

@ItsWendell ItsWendell commented Jun 3, 2023 •

Copy link
Copy Markdown

… environments to crash

This is a hotfix to prevent React Native clients from crashing, by putting the const textDecoder = newTextDecoder() within the parseJsonStream function itself we prevent it from always being initialized, and people who use React Native can opt out of using this batch stream link.

Closes #

🎯 Changes

What changes are made in this PR? Is it a feature or a bug fix?

✅ Checklist

  • I have followed the steps listed in the Contributing guide.
  • If necessary, I have added documentation related to the changes made.
  • I have added or updated the tests related to the changes made.

… environments to crash

This is a hotfix to prevent React Native clients from crashing, by putting the `const textDecoder = newTextDecoder()` within the parseJsonStream function itself we prevent it from always being initialized, and people who use React Native can opt out of using this batch stream link.
@ItsWendell
ItsWendell requested a review from a team as a code owner June 3, 2023 18:50
@vercel

vercel Bot commented Jun 3, 2023

Copy link
Copy Markdown

@ItsWendell is attempting to deploy a commit to the trpc Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Jun 3, 2023 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2023 7:03pm

@KATT

KATT commented Jun 4, 2023

Copy link
Copy Markdown
Member

Hey @ItsWendell, I think this should be fixed in the latest release, sorry for the issue! Open a bug if it doesn't work :)

See #4481

@KATT KATT closed this Jun 4, 2023
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 5, 2023

This branch was successfully deployed

2 active deployments
Preview – www — 22e2fae6 Deployed Jun 3, 2023 by vercel[bot]
Preview – todomvc — 22e2fae6 Deployed Jun 3, 2023 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants