From 318dca8781c188b78c391d33964ff139e9be37e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 3 Apr 2025 15:26:31 +0200 Subject: [PATCH] remove unnecessary code --- .../entity-detail/entity-detail-workspace-base.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/entity-detail/entity-detail-workspace-base.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/entity-detail/entity-detail-workspace-base.ts index 08db0ed87f4a..08b396b51500 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/entity-detail/entity-detail-workspace-base.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/entity-detail/entity-detail-workspace-base.ts @@ -359,13 +359,6 @@ export abstract class UmbEntityDetailWorkspaceContextBase< return true; } - /* TODO: temp removal of discard changes in workspace modals. - The modal closes before the discard changes dialog is resolved.*/ - // TODO: I think this can go away now??? - if (newUrl.includes('/modal/umb-modal-workspace/')) { - return true; - } - if (this._checkWillNavigateAway(newUrl) && this._getHasUnpersistedChanges()) { /* Since ours modals are async while events are synchronous, we need to prevent the default behavior of the event, even if the modal hasn’t been resolved yet. Once the modal is resolved (the user accepted to discard the changes and navigate away from the route), we will push a new history state.