refactor: 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>
This commit is contained in:
Tobias Speicher 2022-03-20 05:55:28 +01:00
parent 3886398541
commit 0a713019c3
No known key found for this signature in database
GPG key ID: 2CF824BD810C3BDB
9 changed files with 9 additions and 9 deletions

2
lib/config-utils.js generated
View file

@ -435,7 +435,7 @@ async function addQueriesAndPacksFromWorkflow(codeQL, queriesInput, languages, r
// should instead be added in addition
function shouldAddConfigFileQueries(queriesInput) {
if (queriesInput) {
return queriesInput.trimStart().substr(0, 1) === "+";
return queriesInput.trimStart().slice(0, 1) === "+";
}
return true;
}