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 c1d7d305db
commit 96bef51c86
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() {
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;
}),