Skip to content

Commit

Permalink
Fix dropping to end or list / empty target
Browse files Browse the repository at this point in the history
insertBefore requires two arguments.  Sigh.
  • Loading branch information
michaelmalonenz committed Feb 4, 2019
1 parent 087c8de commit 80a3007
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dragula.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export class Dragula {
const prevSibling = item.previousSibling
if (this._currentSibling == null && prevSibling &&
prevSibling.nodeName === '#comment' && prevSibling.data === 'anchor') {
target.insertBefore(prevSibling)
target.insertBefore(item, prevSibling)
}
if (this._copy && this.options.copySortSource && target === this._source) {
let parent = Util.getParent(this._item)
Expand Down

0 comments on commit 80a3007

Please sign in to comment.