babel-plugin-angularjs-annotate icon indicating copy to clipboard operation
babel-plugin-angularjs-annotate copied to clipboard

Avoid error when state.children is a function call (CallExpression)

Open leonid-shevtsov opened this issue 7 years ago • 0 comments

I encountered an error when the value of a children property was a function call, not an array.

Specific example:

children: angular.copy(initialStateArrayThatIsReused)

I'm not experienced with Babel enough to explain why this happens - getting elements seems reliable enough to me. But, adding an explicit check that children is an array makes the problem go away.

I'm using Babel version 6.26.0.

leonid-shevtsov avatar Nov 01 '17 20:11 leonid-shevtsov