fix undefined check

This commit is contained in:
Robert Brignull
2020-08-05 09:40:12 +01:00
parent 6230b36dc2
commit 44c88fdd05
3 changed files with 3 additions and 3 deletions

2
lib/config-utils.js generated
View File

@@ -442,7 +442,7 @@ async function loadConfig(configFile) {
// The list of queries should not be empty for any language. If it is then
// it is a user configuration error.
for (const language of languages) {
if (queries[language].length === 0) {
if (queries[language] === undefined || queries[language].length === 0) {
throw new Error(`Did not detect any queries to run for ${language}. ` +
"Please make sure that the default queries are enabled, or you are specifying queries to run.");
}