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

Replace calls to deprecated String.substr() #6146

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Mar 18, 2022

Addressing #6078.
This is quite tricky whereas several npm packages are also affected.
For now we tried to achieve that by finding & replacing any .substr(a, ?b) with .slice(a, (a)+ b) in all types of bundles.

@plotly/plotly_js
cc: @timeowilliams

@archmoj
Copy link
Contributor Author

archmoj commented Mar 19, 2022

The 'substring' method appears to have some strange behavior. See https://masteringjs.io/tutorials/fundamentals/substring

Perhaps safer to use the slice method instead?

@archmoj archmoj changed the title Replace calls to deprecated String.substr() with .substring() Replace calls to deprecated String.substr() Mar 22, 2022
@gvwilson gvwilson self-assigned this May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants