Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Conversation

@CommanderRoot
Copy link
Contributor

@CommanderRoot CommanderRoot commented Apr 13, 2022

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


This change is marked as an internal change (Task), so will not be included in the changelog.

Preview: https://pr8314--matrix-react-sdk.netlify.app
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.

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

Signed-off-by: Tobias Speicher <[email protected]>
@CommanderRoot CommanderRoot requested a review from a team as a code owner April 13, 2022 23:45
Copy link
Contributor

@germain-gg germain-gg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks pretty sensible, thank you for your contribution 💯

@germain-gg germain-gg changed the title Replace deprecated String.prototype.substr() Replace deprecated String#substr with String#slice Apr 14, 2022
@germain-gg germain-gg enabled auto-merge (squash) April 14, 2022 07:47
@germain-gg germain-gg added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Apr 14, 2022
@germain-gg germain-gg merged commit c35fc16 into matrix-org:develop Apr 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

T-Task Refactoring, enabling or disabling functionality, other engineering tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants