mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +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:
		@@ -20,7 +20,7 @@ export function initCommonIssue() {
 | 
			
		||||
    const issueIDs = $('.issue-checkbox').children('input:checked').map((_, el) => {
 | 
			
		||||
      return el.getAttribute('data-issue-id');
 | 
			
		||||
    }).get().join(',');
 | 
			
		||||
    if (elementId === '0' && url.substr(-9) === '/assignee') {
 | 
			
		||||
    if (elementId === '0' && url.slice(-9) === '/assignee') {
 | 
			
		||||
      elementId = '';
 | 
			
		||||
      action = 'clear';
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user