refactor: replace .indexOf() with .includes() (#39195)

This commit is contained in:
Milan Burda 2023-07-24 12:32:54 +02:00 committed by GitHub
parent 9cd5de7588
commit 2c52eb7e1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View file

@ -117,7 +117,7 @@ async function createRelease (branchToTarget, isBeta) {
name: `electron ${newVersion}`,
body: releaseBody,
prerelease: releaseIsPrelease,
target_commitish: newVersion.indexOf('nightly') !== -1 ? 'main' : branchToTarget
target_commitish: newVersion.includes('nightly') ? 'main' : branchToTarget
}).catch(err => {
console.log(`${fail} Error creating new release: `, err);
process.exit(1);