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 deprecated String.prototype.substr() #707

Closed
wants to merge 1 commit into from
Closed

Replace deprecated String.prototype.substr() #707

wants to merge 1 commit into from

Conversation

CommanderRoot
Copy link
Contributor

String.prototype.substr() is deprecated so we replace it with String.prototype.slice() which works similarily but isn't deprecated.
.substr() probably isn't going away anytime soon but the change is trivial so it doesn't hurt to do it.

.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <[email protected]>
@tacruc
Copy link
Collaborator

tacruc commented Apr 14, 2022

A port to the new UI based on Vue #510 is needed. Reopen if planned.

@tacruc tacruc closed this Apr 14, 2022
@CommanderRoot
Copy link
Contributor Author

I have rebased the PR on the current master branch.

@tacruc
Copy link
Collaborator

tacruc commented Apr 14, 2022

Hey, thanks would you mind running the replacement over the new files, too?

@CommanderRoot
Copy link
Contributor Author

I did and I also added a new ESLint rule to prevent new usages of substr. If you open the PR again you should see the new commit

@tacruc
Copy link
Collaborator

tacruc commented Apr 14, 2022

Actually, I can not. Maybe just create a new PR, sorry.
image

@CommanderRoot
Copy link
Contributor Author

Not a problem. I opened #716

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.

2 participants