Browse Source

HUE-6068 [assist] Protect against missing metastore app

Romain Rigaux 8 years ago
parent
commit
1156f2a646
1 changed files with 1 additions and 1 deletions
  1. 1 1
      desktop/core/src/desktop/templates/common_header.mako

+ 1 - 1
desktop/core/src/desktop/templates/common_header.mako

@@ -165,7 +165,7 @@ if USE_NEW_EDITOR.get():
 
 
     huePubSub.subscribe('get.current.app.name', function () {
     huePubSub.subscribe('get.current.app.name', function () {
       var appName = '';
       var appName = '';
-      if ('${ 'metastore' in apps }' === 'True' && location.href.indexOf('${apps['metastore'].display_name}') !== -1) {
+      if ('${ 'metastore' in apps }' === 'True' && location.href.indexOf('${"metastore" in apps and apps["metastore"].display_name}') !== -1) {
         appName = 'metastore';
         appName = 'metastore';
       } else if (location.href.indexOf('${ url('notebook:editor') }') !== -1) {
       } else if (location.href.indexOf('${ url('notebook:editor') }') !== -1) {
         appName = 'editor'
         appName = 'editor'