Skip to content

Commit

Permalink
Merge pull request #582 from ajaxorg/hotfix/lenght
Browse files Browse the repository at this point in the history
Added check that gives warning about 'lenght' [sic] properties.
  • Loading branch information
mikedeboer committed Nov 30, 2011
2 parents fe1560d + 942a7fe commit fc307e8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/ext/jslanguage/scope_analyzer.js
Expand Up @@ -119,6 +119,13 @@ handler.analyze = function(doc, ast) {
// Put back
scope[b.x.value] = oldVar;
return node;
},
'PropAccess(_, "lenght")', function(b, node) {
markers.push({
pos: node.getPos(),
type: 'warning',
message: "Did you mean 'length'?"
});
}
);
if(!parentLocalVars) {
Expand Down

0 comments on commit fc307e8

Please sign in to comment.