Skip to content

Commit

Permalink
[BUG] Fix cancel revert with copy and copySortSource
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilBroadbent committed Oct 26, 2017
1 parent 7b9d90e commit d483ddd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dragula.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,10 @@ function dragula (initialContainers, options) {
var initial = isInitialPlacement(parent);
if (initial === false && reverts) {
if (_copy) {
if (parent) {
parent.removeChild(_copy);
if (parent && parent !== _source) {
parent.removeChild(_copy);
} else {
_source.insertBefore(item, _initialSibling);
}
} else {
_source.insertBefore(item, _initialSibling);
Expand Down

0 comments on commit d483ddd

Please sign in to comment.