CStack doesn't allow its children to be empty
See original GitHub issueDescribe the bug When CStack has no children (i.e. default slot is empty), the runtime error of “filter of ‘undefined’” will occur.
To Reproduce (I’m experiencing this in Nuxt.)
- Go to https://codesandbox.io/s/epic-nash-q7bgo?file=/src/App.vue
- See Console
- You will get
TypeError: Cannot read property 'filter' of undefined
Expected behavior No errors occurs
Additional context https://github.com/chakra-ui/chakra-ui-vue/blob/782fecd8b57a4e064fe0342c89ed2d998960f9ec/packages/chakra-ui-core/src/CStack/CStack.js#L78-L80
We have to first check if default
exists under this.$slots
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Unable to free const pointers in C - Stack Overflow
Several people have posted the right answer, but they keep deleting it for some reason. You need to cast it to a non-const...
Read more >COP3530 CHP 07 to CHP 12 Flashcards - Quizlet
When using a circular array implementation for a queue, you maintain a count of the items in the queue to determine if it...
Read more >Part I: 20 Multiple choice questions (2 points each) - Washington
Every binary tree has at least one node. B. Every non-empty tree has exactly one root node. C. Every node has at most...
Read more >Part 10 - Splitting a Leaf Node | Let's Build a Simple Database
Let N be the root node. First allocate two nodes, say L and R. Move lower half of N into L and the...
Read more >Data structures in C: Stack - DEV Community
Introduction Stack is a linear data structure that puts its elements one ... Creates and returns an empty stack, with maximum capacity m...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@codebender828 looks like it work! Thanks for closing this.
Thank you @faaizajaz. I appreciate the comment. It’s really encouraging as there’s a lot to be done 😄
You can test the PR on this codesandbox before I merge it.