diff --git a/changelog/11182.txt b/changelog/11182.txt new file mode 100644 index 000000000..cdb40ed84 --- /dev/null +++ b/changelog/11182.txt @@ -0,0 +1,4 @@ +```release-note:bug +ui: Fix namespace-bug on login +``` + diff --git a/ui/app/components/namespace-link.js b/ui/app/components/namespace-link.js index 310fb219f..954a5f0b6 100644 --- a/ui/app/components/namespace-link.js +++ b/ui/app/components/namespace-link.js @@ -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; }),