Prechádzať zdrojové kódy

HUE-8758 [core] Fix empty catalog list in table browser.

jdesjean 6 rokov pred
rodič
commit
fd5cbb9edf

+ 9 - 7
apps/metastore/src/metastore/static/metastore/js/metastore.ko.js

@@ -75,13 +75,15 @@ var MetastoreViewModel = (function () {
             }))
           }
         });
-        clusterConfig.app_config.catalogs.forEach(function (interpreter) {
-          sources.push(new MetastoreSource({
-            metastoreViewModel: self,
-            name: interpreter.name,
-            type: interpreter.type
-          }))
-        });
+        if (clusterConfig.app_config.catalogs) {
+          clusterConfig.app_config.catalogs.forEach(function (interpreter) {
+            sources.push(new MetastoreSource({
+              metastoreViewModel: self,
+              name: interpreter.name,
+              type: interpreter.type
+            }))
+          });
+        }
         if (!sources.length) {
           sources.push(new MetastoreSource({
             metastoreViewModel: self,