diff --git a/ng-annotate-main.js b/ng-annotate-main.js index 11847ee..4746504 100644 --- a/ng-annotate-main.js +++ b/ng-annotate-main.js @@ -218,11 +218,15 @@ function matchNgUi(path) { matchStateProps(properties, res); const childrenArrayExpression = matchProp("children", properties); - const children = childrenArrayExpression && childrenArrayExpression.get("elements"); + if (!childrenArrayExpression || !t.isArrayExpression(childrenArrayExpression)) { + return + } + const children = childrenArrayExpression.get("elements"); if (!children) { return; } + children.forEach(recursiveMatch); }