olov / ng-annotate

Add, remove and rebuild AngularJS dependency injection annotations
MIT License
2.03k stars 150 forks source link

Parsing problems on newest node 0.12.* #137

Closed char0n closed 9 years ago

char0n commented 9 years ago

When using ng-annotate on newest node 0.12.*, there is a problem with parsing code like this:

angular.module('module',[])

.filter('filternName', function(selected, items) { if (!selected || !selected.length) { return items; } else { return items.filter(notSelected); } }) ;

Notice the items.filter code fragment. This causes ng-annotate to stop working and triggers and error. I cannot trace the original error because i installed 0.10.* node version, on which ng-annotate works.

olov commented 9 years ago

I just tested your example with node-v0.12.0-darwin-x64 and ng-annotate 0.15.4 and it works fine. If you're able to repro again then please re-open and upload error message and versions you're using.