mirror of
https://code.forgejo.org/actions/checkout.git
synced 2025-08-12 00:34:51 +02:00
Replace deprecated String.prototype.substr()
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 slice() which works similarily but isn't deprecated. Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
This commit is contained in:
parent
2d1c1198e7
commit
dedef103f1
4 changed files with 13 additions and 13 deletions
|
@ -273,8 +273,8 @@ function select(obj: any, path: string): any {
|
|||
return obj[path]
|
||||
}
|
||||
|
||||
const key = path.substr(0, i)
|
||||
return select(obj[key], path.substr(i + 1))
|
||||
const key = path.slice(0, i)
|
||||
return select(obj[key], path.slice(i + 1))
|
||||
}
|
||||
|
||||
function isGhes(): boolean {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue