diff --git a/ui-v2/app/components/outlet/index.js b/ui-v2/app/components/outlet/index.js index 02bb8af42..c7de8dd4a 100644 --- a/ui-v2/app/components/outlet/index.js +++ b/ui-v2/app/components/outlet/index.js @@ -65,8 +65,9 @@ export default class Outlet extends Component { } setAppRoute(name) { - if (name.startsWith('nspace.')) { - name = name.substr(0, 'nspace.'.length); + const nspace = 'nspace.'; + if (name.startsWith(nspace)) { + name = name.substr(nspace.length); } if (name !== 'loading') { const doc = this.dom.root();