-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in Stack.js when <Stack> component only contains one child component #23
Comments
Hey @dvmorris You are probably the first user out of our company right now! Can you publish the whole log stack? |
No problem, it's a really interesting approach, and I'm looking forward to using it. I will post a sample project in a few minutes. |
Here is a design.zip file from WebFlow that demonstrates the issue. Steps to reproduce (assuming stanza is already installed), and the design.zip file is in your
For now, you also have to manually add
Open the web browser to http://localhost:3000/ and view the console output:
|
Oh, here is an explanation from the React docs: https://facebook.github.io/react/tips/children-props-type.html I guess this won't be a common issue, because you wouldn't use a with one item in it, but it might be worth putting some code in the class to check for that. |
I was playing around with Stanza today, and I got an error when I ran an app with the component containing only one sub-component. The error was on line 85 of Stack.js:
return _lodash2.default.first(this.props.children).props.index;
It looks like this.props.children contains the actual child object in that case, rather than an array containing one object, which causes this function to fail.
I'm fairly new to meteor, so I might be missing something else, but this should be fairly easy for you to reproduce in a test project.
The text was updated successfully, but these errors were encountered: