Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 075e05c

Browse files
Merge pull request #10068 from Mark-Simulacrum/hotfix-codeinspection
Fixes the exception thrown when the provider list for a given language is undefined.
2 parents fcff4a0 + 824bef9 commit 075e05c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/language/CodeInspection.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ define(function (require, exports, module) {
161161
* @return ?{Array.<{name:string, scanFileAsync:?function(string, string):!{$.Promise}, scanFile:?function(string, string):?{errors:!Array, aborted:boolean}}>} provider
162162
*/
163163
function getProvidersForPath(filePath) {
164-
return _providers[LanguageManager.getLanguageForPath(filePath).getId()].slice(0) || [];
164+
var providers = _providers[LanguageManager.getLanguageForPath(filePath).getId()];
165+
return (providers && providers.slice(0)) || [];
165166
}
166167

167168
/**

0 commit comments

Comments
 (0)