Skip to content

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

Open
leonid-shevtsov wants to merge 1 commit intoschmod:masterfrom
leonid-shevtsov:fix-scope-children-call-expression
Open

Avoid error when state.children is a function call (CallExpression)#34
leonid-shevtsov wants to merge 1 commit intoschmod:masterfrom
leonid-shevtsov:fix-scope-children-call-expression

Conversation

@leonid-shevtsov
Copy link

@leonid-shevtsov leonid-shevtsov commented Nov 1, 2017

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 leonid-shevtsov force-pushed the fix-scope-children-call-expression branch from d00d581 to 4e2640b Compare November 2, 2017 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant