chore: replace deprecated String.prototype.substr() (#6333)
* chore: replace deprecated String.prototype.substr() .substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher <rootcommander@gmail.com> * refactor: add prefer slice lint rule and fix errors Co-authored-by: erezrokah <erezrokah@users.noreply.github.com>
This commit is contained in:
@ -293,7 +293,7 @@ export default class API {
|
||||
fromBase64 = (str: string) => Base64.decode(str);
|
||||
|
||||
branchToRef = (branch: string): string => `refs/heads/${branch}`;
|
||||
refToBranch = (ref: string): string => ref.substr('refs/heads/'.length);
|
||||
refToBranch = (ref: string): string => ref.slice('refs/heads/'.length);
|
||||
|
||||
user = async () => {
|
||||
const result = await this.requestJSON<AzureUser>({
|
||||
|
Reference in New Issue
Block a user