more hardening.

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD
2025-02-07 12:36:43 -07:00
parent 1d8e8059cd
commit 08ea40a08e

View File

@@ -1391,7 +1391,7 @@ function loadUserColumnPreferences(columns, order) {
//re-order items in menu //re-order items in menu
var itemToMove = $(`[data-column-toggle='${x}'].col-visible-toggle`).closest('.dropdown-item'); var itemToMove = $(`[data-column-toggle='${x}'].col-visible-toggle`).closest('.dropdown-item');
var itemCurrentlyInPosition = $('.dropdown-item[draggable="true"]')[y]; var itemCurrentlyInPosition = $('.dropdown-item[draggable="true"]')[y];
if (itemToMove != undefined && itemCurrentlyInPosition != undefined) { if (itemToMove != undefined && itemToMove.length > 0 && itemCurrentlyInPosition != undefined) {
itemToMove.insertBefore(itemCurrentlyInPosition); itemToMove.insertBefore(itemCurrentlyInPosition);
} }
//re-order table columns //re-order table columns