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

refactor: replace deprecated String.prototype.substr() #3448

Merged
merged 3 commits into from
Apr 11, 2022
Merged

refactor: replace deprecated String.prototype.substr() #3448

merged 3 commits into from
Apr 11, 2022

Conversation

CommanderRoot
Copy link
Contributor

Description

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.

Related Issue

Motivation and Context

String.prototype.substr() is deprecated

How Has This Been Tested?

I tested the return of each statement to make sure it's still the same as before

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

.substr() is deprecated so we replace it with functions which work similarily but aren't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
@update-docs
Copy link

update-docs bot commented Apr 4, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 4, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@C0rby C0rby merged commit b291cca into owncloud:master Apr 11, 2022
ownclouders pushed a commit that referenced this pull request Apr 11, 2022
Merge: 251e5d2 4227769
Author: David Christofas <dchristofas@owncloud.com>
Date:   Mon Apr 11 16:27:47 2022 +0200

    Merge pull request #3448 from CommanderRoot/refactor/rm-deprecated-substr

    refactor: replace deprecated String.prototype.substr()
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