Skip to content

Conversation

@AllenYu0118
Copy link
Contributor

@AllenYu0118 AllenYu0118 commented Dec 18, 2023

πŸ”— Linked issue

Close #101

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Use a more compatible method.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@RazorSiM
Copy link

Monkey patched destr with this change and solved my issue with older browsers. Thanks!

@pi0 pi0 changed the title chore: improve compatibility fix: improve compatibility with runtimes not supporting String.prototype.at() Dec 21, 2023
@pi0
Copy link
Member

pi0 commented Dec 21, 2023

Thanks for PR. Seems good compromise to preserve more compat!

MDN support for reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/at#browser_compatibility

@codecov
Copy link

codecov bot commented Dec 21, 2023

Codecov Report

All modified and coverable lines are covered by tests βœ…

Comparison is base (39f75a1) 100.00% compared to head (a979d72) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #102   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          100       100           
  Branches        40        40           
=========================================
  Hits           100       100           

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@pi0 pi0 merged commit 8b08aa8 into unjs:main Dec 21, 2023
@daniluk4000
Copy link

@pi0 is it possible to 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 this pull request may close these issues.

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

4 participants