Skip to content

Commit

Permalink
Formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rapsacnz authored Jun 24, 2018
1 parent 08f007c commit d449af3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/aura/OrderedList/OrderedListHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@
event.preventDefault();
event.stopPropagation();

var targetOption = event.target;
if (targetOption !== undefined) {
//fix to prevent duplication of items when dragged onto the same list
var targetOption = event.target;
if (targetOption !== undefined) {
while (targetOption !== undefined && targetOption.tagName !== 'li' && targetOption.tagName !== 'LI') {
targetOption = targetOption.parentElement;
}
}
targetOption = targetOption.parentElement;
}
}

var items = component.get("v.items");
var rawData = event.dataTransfer.getData('text');
var item = JSON.parse(rawData);
Expand Down

0 comments on commit d449af3

Please sign in to comment.