mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-23 10:08:02 +08:00
Replace deprecated String.prototype.substr() with String.prototype.slice() (#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>
This commit is contained in:
@ -36,8 +36,8 @@ function selectRange($list, $select, $from) {
|
||||
};
|
||||
|
||||
if ($from) {
|
||||
let a = parseInt($select.attr('rel').substr(1));
|
||||
let b = parseInt($from.attr('rel').substr(1));
|
||||
let a = parseInt($select.attr('rel').slice(1));
|
||||
let b = parseInt($from.attr('rel').slice(1));
|
||||
let c;
|
||||
if (a !== b) {
|
||||
if (a > b) {
|
||||
|
Reference in New Issue
Block a user