v-for on a template which has a comment: throws an error when trying to shuffle the array
Version
3.0.0-rc.10
Reproduction link
https://codesandbox.io/s/youthful-sky-is4hc?file=/src/App.vue
Steps to reproduce
- Open reproduction link
- click on shuffle
What is expected?
Items should be rendered correctly after shuffling the array
What is actually happening?
Getting the following error:
Uncaught (in promise) TypeError: Failed to execute 'insertBefore' on 'Node': parameter 1 is not of type 'Node'.
Simply change <template>
to <div>
or remove ':key="item.id"' will avoid the problem.
Disallow key attribute on <template>