From b22fc83978c37da4e2761efd41d9f11f553dc924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 11 Dec 2024 16:17:38 +0100 Subject: [PATCH] use replaceState --- .../controllers/workspace-is-new-redirect.controller.ts | 2 +- .../documents/workspace/document-workspace-editor.element.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/controllers/workspace-is-new-redirect.controller.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/controllers/workspace-is-new-redirect.controller.ts index b553b2c00b53..37c8bf0becfb 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/controllers/workspace-is-new-redirect.controller.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/controllers/workspace-is-new-redirect.controller.ts @@ -34,7 +34,7 @@ export class UmbWorkspaceIsNewRedirectController extends UmbControllerBase { id: unique, }); this.destroy(); - window.history.pushState({}, '', newPath); + window.history.replaceState({}, '', newPath); } } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace-editor.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace-editor.element.ts index 0482a812a30e..581d6c19c4c0 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace-editor.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace-editor.element.ts @@ -102,11 +102,11 @@ export class UmbDocumentWorkspaceEditorElement extends UmbLitElement { if (!route) { // TODO: Notice: here is a specific index used for fallback, this could be made more solid [NL] - history.pushState({}, '', `${this.#workspaceRoute}/${routes[routes.length - 3].path}`); + history.replaceState({}, '', `${this.#workspaceRoute}/${routes[routes.length - 3].path}`); return; } - history.pushState({}, '', `${this.#workspaceRoute}/${route?.path}`); + history.replaceState({}, '', `${this.#workspaceRoute}/${route?.path}`); }, }); }