-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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() with String.prototype.slice() #18796
Conversation
|
|
Codecov Report
@@ Coverage Diff @@
## main #18796 +/- ##
=======================================
Coverage ? 46.58%
=======================================
Files ? 853
Lines ? 122463
Branches ? 0
=======================================
Hits ? 57050
Misses ? 58526
Partials ? 6887 Continue to review full report at Codecov.
|
My apologies. I ignored the files in the vendor folder but didn't check if the other files are possibly vendored as well. I have now changed the commit to exclude the mentioned file |
…ice() String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) so we replace it with the slice() method which works similarily but isn't deprecated. Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
CI failure is unrelated, maybe #18793 will resolve it. |
make L-G-T-M work |
* giteaofficial/main: Fix ldap loginname (go-gitea#18789) Replace deprecated String.prototype.substr() with String.prototype.slice() (go-gitea#18796) Fix problem when self-assign notification (go-gitea#18797) Move editorconfig-checker to lint-backend and remove JS wrapper (go-gitea#18793)
…ice() (go-gitea#18796) String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) so we replace it with the slice() method which works similarily but isn't deprecated. Signed-off-by: Tobias Speicher <rootcommander@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
String.prototype.substr() is deprecated so we replace it with the String.prototype.slice() method which works similarily but isn't deprecated.
substr() probably isn't going away anytime soon but it doesn't hurt to replace it as the change isn't difficult at all.