Browse Source

HUE-8435 [editor] Prevent js error when a compute is selected with no corresponding namespace

Johan Ahlen 7 years ago
parent
commit
c9c78987c5

+ 2 - 2
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -479,8 +479,8 @@ var EditorViewModel = (function() {
               return true;
             }
           });
-          if (!found) {
-            self.namespace(undefined);
+          if (!found && newCompute.namespace) {
+            self.namespace(newCompute.namespace);
           }
         }
       });