Vue.Draggable
Vue.Draggable copied to clipboard
Uncaught TypeError: Cannot read property 'nextSibling' of undefined #538
Please change function
function insertNodeAt(fatherNode, node, position) { const refNode = position === 0 ? fatherNode.children[0] : fatherNode.children[position - 1].nextSibling; fatherNode.insertBefore(node, refNode); }
to
`
function insertNodeAt(fatherNode, node, position) {
const refNode =
position === 0
? fatherNode.children[0]
: fatherNode.children[position - 1]
? fatherNode.children[position - 1].nextSibling
: null;
if (fatherNode) {
fatherNode.insertBefore(node, refNode);
}
}
`
This error is still existed https://github.com/SortableJS/Vue.Draggable/issues/538
Hi @David-Desmaisons , can you take a look this issue?