Use more explicit checks on .length for readability

This commit is contained in:
Henry Mercer
2025-08-05 17:55:50 +01:00
parent e682065360
commit ea05bf27b6
15 changed files with 15 additions and 15 deletions

2
lib/config-utils.js generated
View File

@@ -218,7 +218,7 @@ function getRawLanguagesNoAutodetect(languagesInput) {
async function getRawLanguages(languagesInput, repository, logger) {
// If the user has specified languages, use those.
const languagesFromInput = getRawLanguagesNoAutodetect(languagesInput);
if (languagesFromInput.length) {
if (languagesFromInput.length > 0) {
return { rawLanguages: languagesFromInput, autodetected: false };
}
// Otherwise, autodetect languages in the repository.