瀏覽代碼

HUE-7949 [dashboard] Avoid breaking the dashboard if the collection name is missing

Enrico Berti 7 年之前
父節點
當前提交
78a55f8b08
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      desktop/core/src/desktop/templates/assist.mako

+ 4 - 0
desktop/core/src/desktop/templates/assist.mako

@@ -2947,6 +2947,10 @@ from desktop.views import _ko
         var activeDashboardCollection = huePubSub.subscribe('set.active.dashboard.collection', function(collection) {
           var collectionName = collection.name();
 
+          if (!collectionName) {
+            return;
+          }
+
           var assistDbSource = new AssistDbSource({
             i18n : i18n,
             type: collection.engine(),