Skip to content

Commit

Permalink
Improve readability of fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Dec 3, 2014
1 parent b172e54 commit 4550b50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/language/CodeInspection.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ define(function (require, exports, module) {
* @return ?{Array.<{name:string, scanFileAsync:?function(string, string):!{$.Promise}, scanFile:?function(string, string):?{errors:!Array, aborted:boolean}}>} provider
*/
function getProvidersForPath(filePath) {
return (_providers[LanguageManager.getLanguageForPath(filePath).getId()] || []).slice(0);
var providers = _providers[LanguageManager.getLanguageForPath(filePath).getId()];
return providers && providers.slice(0) || [];
}

/**
Expand Down

0 comments on commit 4550b50

Please sign in to comment.