Subscribe on changes!

"oldChildren is null" using v-for in <slot>

avatar
Dec 14th 2020

Version

3.0.4

Reproduction link

https://codeberg.org/g-braeunlich/vue3-bug

Steps to reproduce

What is expected?

Browser displays "1"

What is actually happening?

[Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/vue-next 
  at <Anonymous> 
  at <App>
Uncaught (in promise) TypeError: oldChildren is null
    patchBlockChildren runtime-core.esm-bundler.js:3996
    processFragment runtime-core.esm-bundler.js:4065
    patch runtime-core.esm-bundler.js:3708
    patchBlockChildren runtime-core.esm-bundler.js:4013
    patchElement runtime-core.esm-bundler.js:3977
    processElement runtime-core.esm-bundler.js:3795
    patch runtime-core.esm-bundler.js:3712
    componentEffect runtime-core.esm-bundler.js:4275
    reactiveEffect reactivity.esm-bundler.js:42
    callWithErrorHandling runtime-core.esm-bundler.js:154
    flushJobs runtime-core.esm-bundler.js:362

This bug happens if a component with a slot is given a child with a v-for, which is initially looping over an empty array and later changed to a non empty array.

The bug does not occur if the loop runs over a non empty list during creation

avatar
Dec 15th 2020

Same as #2715 and closed by #2717