question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CStack doesn't allow its children to be empty

See original GitHub issue

Describe 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.)

  1. Go to https://codesandbox.io/s/epic-nash-q7bgo?file=/src/App.vue
  2. See Console
  3. 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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
faaizajazcommented, Jul 9, 2021

@codebender828 looks like it work! Thanks for closing this.

1reaction
codebender828commented, Jul 8, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found