Skip to content

Commit

Permalink
UI/namespace bug (#11182)
Browse files Browse the repository at this point in the history
* fix with console to confirm showing

* remove console

* move order

* add changelog
  • Loading branch information
Monkeychip authored Mar 23, 2021
1 parent c1d7d30 commit 96bef51
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions changelog/11182.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```release-note:bug
ui: Fix namespace-bug on login
```

6 changes: 2 additions & 4 deletions ui/app/components/namespace-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ export default Component.extend({

namespaceDisplay: computed('normalizedNamespace', 'showLastSegment', function() {
let ns = this.normalizedNamespace;
if (!ns) return 'root';
let showLastSegment = this.showLastSegment;
let parts = ns.split('/');
if (ns === '') {
return 'root';
}
let parts = ns?.split('/');
return showLastSegment ? parts[parts.length - 1] : ns;
}),

Expand Down

0 comments on commit 96bef51

Please sign in to comment.