diff --git a/dashboard/src/app/workspaces/workspace-details/workspace-details.controller.ts b/dashboard/src/app/workspaces/workspace-details/workspace-details.controller.ts index 7f52a56a746..06af1245a25 100644 --- a/dashboard/src/app/workspaces/workspace-details/workspace-details.controller.ts +++ b/dashboard/src/app/workspaces/workspace-details/workspace-details.controller.ts @@ -117,7 +117,7 @@ export class WorkspaceDetailsController { init(): void { let routeParams = this.$route.current.params; - this.workspaceNamespace = this.$location.search().namespace || (this.getNamespaces() ? this.getNamespaces()[0].id : undefined); + this.workspaceNamespace = this.$location.search().namespace || (this.getNamespaces().length ? this.getNamespaces()[0].id : undefined); if (routeParams && routeParams.namespace && routeParams.workspaceName) { this.isCreationFlow = false; this.namespace = routeParams.namespace;