Skip to content
Snippets Groups Projects

Issue #3443376: Fix eslint in commerce_checkout

Merged Dmytrii Kaiun requested to merge issue/commerce-3443376:3443376-fix-the-eslint into 8.x-2.x
Files
2
@@ -74,11 +74,12 @@
$(rowObject.table)
.find('tr.region-message')
.each(function () {
const $that = $(this);
const message = this;
const $message = $(message);
// If the dragged row is in this region, but above the message row, swap
// it down one space.
if (
$that.prev('tr').get(0) ===
$message.prev('tr').get(0) ===
rowObject.group[rowObject.group.length - 1]
) {
// Prevent a recursion problem when using the keyboard to move rows
@@ -90,16 +91,14 @@
rowObject.swap('after', this);
}
}
const nextRow = message.nextElementSibling;
// This region has become empty.
if (
$that.next('tr').is(':not(.draggable)') ||
$that.next('tr').length === 0
) {
$that.removeClass('region-populated').addClass('region-empty');
if (!nextRow || !nextRow.matches('.draggable')) {
$message.removeClass('region-populated').addClass('region-empty');
}
// This region has become populated.
else if ($that.is('.region-empty')) {
$that.removeClass('region-empty').addClass('region-populated');
else if (message.matches('.region-empty')) {
$message.removeClass('region-empty').addClass('region-populated');
}
});
},
Loading