diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-editor/workspace-editor.context.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-editor/workspace-editor.context.ts
index dd916b5a2e..e1c3724876 100644
--- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-editor/workspace-editor.context.ts
+++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-editor/workspace-editor.context.ts
@@ -38,9 +38,9 @@ export class UmbWorkspaceEditorContext extends UmbContextBase {
(view) => !workspaceViews.some((x) => x.manifest.alias === view.manifest.alias),
);
- const diff = viewsToKeep.length !== workspaceViews.length;
+ const hasDiff = viewsToKeep.length !== workspaceViews.length;
- if (diff) {
+ if (hasDiff) {
const newViews = [...viewsToKeep];
// Add ones that are new:
diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-editor/workspace-editor.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-editor/workspace-editor.element.ts
index 499278f5d1..10866294c8 100644
--- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-editor/workspace-editor.element.ts
+++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-editor/workspace-editor.element.ts
@@ -136,26 +136,26 @@ export class UmbWorkspaceEditorElement extends UmbLitElement {
}
override render() {
- return this._routes
- ? html`
-
- ${this.#renderBackButton()}
-
-
- ${this.#renderViews()} ${this.#renderRoutes()}
-
- ${when(
- !this.enforceNoFooter,
- () => html`
-
-
-
-
- `,
- )}
-
- `
- : nothing;
+ // Notice if no routes then fallback to use a slot.
+ // TODO: Deprecate the slot feature, to rely purely on routes, cause currently bringing an additional route would mean the slotted content would never be shown. [NL]
+ return html`
+
+ ${this.#renderBackButton()}
+
+
+ ${this.#renderViews()} ${this.#renderRoutes()}
+
+ ${when(
+ !this.enforceNoFooter,
+ () => html`
+
+
+
+
+ `,
+ )}
+
+ `;
}
#renderViews() {
@@ -213,7 +213,7 @@ export class UmbWorkspaceEditorElement extends UmbLitElement {
}
#renderRoutes() {
- if (!this._routes || this._routes.length === 0) return nothing;
+ if (!this._routes || this._routes.length === 0 || !this._workspaceViews || this._workspaceViews.length === 0) return nothing;
return html`