Closed pepesi closed 9 months ago
Bug 描述 tree.value.prepend 和 tree.value.append报错,TypeError: Cannot read properties of undefined (reading 'id')
我在ui上新建了一个node,然后再向这个node append或者prepend更多子node的时候,就报错了
似乎和这儿有关 https://github.com/wsfe/vue-tree/blob/26b2b5045d58432849fc0c22ccfcde402f440e28/src/store/tree-store.ts#L710
https://github.com/wsfe/vue-tree/blob/26b2b5045d58432849fc0c22ccfcde402f440e28/src/store/tree-store.ts#L734C20-L734C28
这里的代码,当parentnode的children为空的时候,这里就会异常。
Bug 描述 tree.value.prepend 和 tree.value.append报错,TypeError: Cannot read properties of undefined (reading 'id')
我在ui上新建了一个node,然后再向这个node append或者prepend更多子node的时候,就报错了
似乎和这儿有关 https://github.com/wsfe/vue-tree/blob/26b2b5045d58432849fc0c22ccfcde402f440e28/src/store/tree-store.ts#L710
https://github.com/wsfe/vue-tree/blob/26b2b5045d58432849fc0c22ccfcde402f440e28/src/store/tree-store.ts#L734C20-L734C28
这里的代码,当parentnode的children为空的时候,这里就会异常。