phphe / vue-draggable-nested-tree

Vue2 draggable tree component
https://hetree.phphe.com/
MIT License
344 stars 62 forks source link

Pushing data to tree results in error #86

Closed ben-roth closed 5 years ago

ben-roth commented 5 years ago

A simple push of data to my tree results in the following error. Have no idea why, any thoughts or ideas???

My push code

app.data.push({title:"New"})

the error i get:

[Vue warn]: Error in render: "TypeError: Cannot read property '0' of undefined"

found in

---> <TreeNode> at DraggableTreeNode.vue... (1 recursive calls)
       <Tree> at DraggableTree.vue
         <Root>
phphe commented 5 years ago

what is the error line

ben-roth commented 5 years ago

1138

return [t._t("default", null, {

scopedSlots: t._u([{ key: "default", fn: function fn(e) { return [t._t("default", null, { data: e.data, store: t.store, vm: e.vm })]; } }

phphe commented 5 years ago

what's your template? I suspect that your template has a problem.

ben-roth commented 5 years ago

ahh, thank you so much, there was an issue with my template. Thank you!