fix(plugins/languages): avoid crash with null check (#524)
This commit is contained in:
@@ -168,7 +168,9 @@ async function analyze({login, imports, data}, {results, path, categories = ["pr
|
||||
//File marker
|
||||
if (/^[+]{3}\sb[/](?<file>[\s\S]+)$/.test(line)) {
|
||||
file = `${path}/${line.match(/^[+]{3}\sb[/](?<file>[\s\S]+)$/)?.groups?.file}`.replace(/\\/g, "/")
|
||||
lang = categories.includes(languageResults[lang].type) && files[file] || null
|
||||
lang = files[file]
|
||||
if (!categories.includes(languageResults[lang].type))
|
||||
lang = null
|
||||
edited.add(file)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user