Эх сурвалжийг харах

HUE-8049 [dashboard] Gridster shouldn't throw an error if trying to drop more that 4 widgets on a row

Enrico Berti 7 жил өмнө
parent
commit
432cef4

+ 3 - 1
desktop/libs/dashboard/src/dashboard/templates/common_search.mako

@@ -4193,7 +4193,9 @@ $(document).ready(function () {
           var siblingCounter = 0;
           for (var i = 1; i <= 12 / newOptimalWidth; i++) {
             if (i !== droppedWidgetFauxColumn) {
-              resizeAndMove(collindingWidgets[siblingCounter], newOptimalWidth, ((i - 1) * newOptimalWidth) + 1)
+              if (collindingWidgets[siblingCounter]) {
+                resizeAndMove(collindingWidgets[siblingCounter], newOptimalWidth, ((i - 1) * newOptimalWidth) + 1)
+              }
               siblingCounter++;
             }
           }