From 75faffbb6b86ab7d2e00164bf64aa05d716a8d9e Mon Sep 17 00:00:00 2001 From: Julia Gru <56249914+julczka@users.noreply.github.com> Date: Mon, 28 Aug 2023 08:53:02 +0200 Subject: [PATCH] correct null routing --- .../stylesheets/workspace/stylesheet-workspace.element.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/workspace/stylesheet-workspace.element.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/workspace/stylesheet-workspace.element.ts index 436ff5068b..d6a6bb30cf 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/workspace/stylesheet-workspace.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/workspace/stylesheet-workspace.element.ts @@ -15,12 +15,11 @@ export class UmbStylesheetWorkspaceElement extends UmbLitElement { @state() _routes: UmbRoute[] = [ { - path: 'create/:parentId', + path: 'create/:path', component: () => this.#element, setup: async (_component, info) => { - const path = info.match.params.parentId; - const serverPath = serverFilePathFromUrlFriendlyPath(path); - this.#workspaceContext.setIsNew(true); + const path = info.match.params.path === 'null' ? null : info.match.params.path; + const serverPath = path === null ? null : serverFilePathFromUrlFriendlyPath(path); await this.#workspaceContext.create(serverPath); new UmbWorkspaceIsNewRedirectController(