UI/namespace bug (#11182)

* fix with console to confirm showing

* remove console

* move order

* add changelog
This commit is contained in:
Angel Garbarino 2021-03-23 14:55:31 -06:00 committed by GitHub
parent b1b0529b13
commit f158fd31a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

4
changelog/11182.txt Normal file
View File

@ -0,0 +1,4 @@
```release-note:bug
ui: Fix namespace-bug on login
```

View File

@ -19,11 +19,9 @@ export default Component.extend({
namespaceDisplay: computed('normalizedNamespace', 'showLastSegment', function() { namespaceDisplay: computed('normalizedNamespace', 'showLastSegment', function() {
let ns = this.normalizedNamespace; let ns = this.normalizedNamespace;
if (!ns) return 'root';
let showLastSegment = this.showLastSegment; let showLastSegment = this.showLastSegment;
let parts = ns.split('/'); let parts = ns?.split('/');
if (ns === '') {
return 'root';
}
return showLastSegment ? parts[parts.length - 1] : ns; return showLastSegment ? parts[parts.length - 1] : ns;
}), }),