Prechádzať zdrojové kódy

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

Enrico Berti 7 rokov pred
rodič
commit
78a55f8

+ 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(),