Skip to content

Commit a582732

Browse files
nielslyngsoeiOvergaard
authored andcommitted
change route setup
1 parent a4017e6 commit a582732

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,21 +187,20 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements
187187
});
188188
}
189189

190-
routes.push({
191-
path: 'root',
192-
component: () => import('./content-type-design-editor-tab.element.js'),
193-
setup: (component) => {
194-
(component as UmbContentTypeDesignEditorTabElement).containerId = null;
195-
},
196-
});
197-
198-
if (this._hasRootGroups) {
190+
if (this._hasRootGroups || this._tabs.length === 0) {
191+
routes.push({
192+
path: 'root',
193+
component: () => import('./content-type-design-editor-tab.element.js'),
194+
setup: (component) => {
195+
(component as UmbContentTypeDesignEditorTabElement).containerId = null;
196+
},
197+
});
199198
routes.push({
200199
path: '',
201200
redirectTo: 'root',
202201
guards: [() => this._activeTabId === undefined],
203202
});
204-
} else if (routes.length !== 0) {
203+
} else {
205204
routes.push({
206205
path: '',
207206
redirectTo: routes[0]?.path,

0 commit comments

Comments
 (0)