From 5b00ba4322cb3c7e6b5f09e1cb84167943ea3f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 10 Jan 2023 22:17:45 +0100 Subject: [PATCH] do not update if path is the same. --- .../users/current-user/current-user-history.store.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/users/current-user/current-user-history.store.ts b/src/Umbraco.Web.UI.Client/src/backoffice/users/current-user/current-user-history.store.ts index 16ab04f633..19b0e1a1b6 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/users/current-user/current-user-history.store.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/users/current-user/current-user-history.store.ts @@ -9,7 +9,7 @@ export type UmbCurrentUserHistoryItem = { }; export class UmbCurrentUserHistoryStore { - + #history = new UniqueBehaviorSubject( >[] ); @@ -40,11 +40,6 @@ export class UmbCurrentUserHistoryStore { // This prevents duplicate entries in the history array. if (!lastItem || lastItem.path !== historyItem.path) { this.#history.next([...this.#history.getValue(), historyItem]); - } else { - //Update existing item - const newHistory = this.#history.getValue(); - newHistory[history.length - 1] = historyItem; - this.#history.next(newHistory); } }