Explorar o código

HUE-6068 [assist] Protect against missing metastore app

Romain Rigaux %!s(int64=8) %!d(string=hai) anos
pai
achega
1156f2a646
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 () {
       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';
       } else if (location.href.indexOf('${ url('notebook:editor') }') !== -1) {
         appName = 'editor'