浏览代码

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

Enrico Berti 7 年之前
父节点
当前提交
432cef4
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      desktop/libs/dashboard/src/dashboard/templates/common_search.mako

+ 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++;
             }
           }