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

Compatibility Issues with the String.prototype.at() Method #101

Closed
AllenYu0118 opened this issue Dec 18, 2023 · 2 comments · Fixed by #102
Closed

Compatibility Issues with the String.prototype.at() Method #101

AllenYu0118 opened this issue Dec 18, 2023 · 2 comments · Fixed by #102

Comments

@AllenYu0118
Copy link
Contributor

Environment

"node": ">=16",
"pnpm": ">=8.4.0"

Reproduction

Please use a browser with a version below iOS 14.4 to access.
https://stackblitz.com/edit/typescript-hlusqb?file=index.ts

The results displayed by the Chrome browser on iOS 14.4.

Describe the bug

This is just a compatibility issue. When in iOS 14, an error occurs due to the incompatibility of the browser caused by the use of the "at" method. I'm not sure whether to fix it in this library, compile this library in my project, or provide a polyfill.

System Infomation

Additional context

We use Nuxt (v3.8.2) to develop the application. It is possible that the use of renderJsonPayloads: true in the experimental features causes the data to be parsed with destr. In most cases, this is not a problem, but someone reported a white screen issue on iOS 14.

Logs

No response

@RazorSiM
Copy link

I second this issue. I have destr as a dependency of ofetch and the update from 2.0.1 to 2.0.2 broke the app running on Electron 13, that uses Chromium 91.

With Chromium 93, the issue is not there anymore, but we cannot update Electron to v14.

This is where the problem is:

value.at(-1) === '"' &&

@pi0 pi0 closed this as completed in #102 Dec 21, 2023
@daniluk4000
Copy link

@pi0 can you please release new version with this fix? 🙏

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.

3 participants