Skip to content

Commit 4c248ac

Browse files
committed
Fix scoping error
1 parent aa2cae5 commit 4c248ac

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,16 @@ function hasExtensionError(d){
9999
return d.messageText.indexOf('must have extension') > -1;
100100
}
101101

102-
function extensionErrorFilter(d) {
102+
function extensionErrorFilter(errors) {
103103
var otherErrors = !errors.every(hasExtensionError);
104-
return !(otherErrors && hasExtensionError(d));
104+
return function(d) {
105+
return !(otherErrors && hasExtensionError(d));
106+
}
105107
}
106108

107109
function formatErrors(errors) {
108110
return errors
109-
.filter(extensionErrorFilter)
111+
.filter(extensionErrorFilter(errors))
110112
.map(function(diagnostic) {
111113
var lineChar;
112114
if (diagnostic.file) {

0 commit comments

Comments
 (0)