Skip to content

Commit

Permalink
Bug fix namespace issues (#11186) (#11187)
Browse files Browse the repository at this point in the history
* fix known issues not including picker

* fix namespace picker, thank you brian
  • Loading branch information
Monkeychip authored Mar 24, 2021
1 parent 83e523e commit 4e222b8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ui/app/components/namespace-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default Component.extend({
// gets set as 'lastMenuLeaves' in the ember concurrency task above
menuLeaves: computed('namespacePath', 'namespaceTree', 'pathToLeaf', function() {
let ns = this.namespacePath;
ns = ns.replace(/^\//, '');
ns = (ns || '').replace(/^\//, '');
let leaves = ancestorKeysForKey(ns);
leaves.push(ns);
leaves = this.maybeAddRoot(leaves);
Expand All @@ -150,10 +150,8 @@ export default Component.extend({

namespaceDisplay: computed('namespacePath', 'accessibleNamespaces', 'accessibleNamespaces.[]', function() {
let namespace = this.namespacePath;
if (namespace === '') {
return '';
}
let parts = namespace.split('/');
if (!namespace) return '';
let parts = namespace?.split('/');
return parts[parts.length - 1];
}),

Expand Down

0 comments on commit 4e222b8

Please sign in to comment.