Skip to content

Commit e3ddb0b

Browse files
author
Andrew Schmadel
committed
Merge branch 'master' of github.com:schmod/babel-plugin-angularjs-annotate into gh-pages
2 parents 6c2c4cb + 8ea557a commit e3ddb0b

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# babel-plugin-angularjs-annotate changelog
22

3+
## v0.5.2 2016-09-28
4+
* bugfix: fix crash on illegal component declaration (#11)
5+
36
## v0.5.0 2016-08-04
47
* bugfix: follow references in component definition objects (#7)
58
* bugfix: remove superfluous dependency on `babel`

ng-annotate-main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ function matchRegular(path, ctx) {
389389
args.length === 1 && argPaths[0] :
390390
args.length === 2 && t.isLiteral(args[0]) && is.string(args[0].value) && argPaths[1]);
391391

392-
if (method.name === "component") {
392+
if (method.name === "component" && target) {
393393
target.node.$chained = chainedRegular;
394394
return matchComponent(target);
395395
}
@@ -656,7 +656,7 @@ function followReference(path) {
656656
const bound = binding.path;
657657

658658
if (is.someof(kind, ["const", "let", "var"])) {
659-
659+
660660
if(t.isVariableDeclaration(bound)){
661661
var declarations = bound.get('declarations');
662662
assert(declarations.length === 1);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "babel-plugin-angularjs-annotate",
3-
"version": "0.5.1",
3+
"version": "0.5.2",
44
"description": "Babel plugin to add angularjs dependency injection annotations",
55
"main": "babel-ng-annotate.js",
66
"repository": {

0 commit comments

Comments
 (0)