From 788e5cd678559cf24ce5698e73b96b5d707510e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Fri, 4 Apr 2025 11:18:30 +0200 Subject: [PATCH] remove unnecessary code (#18927) --- .../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 08db0ed87f..08b396b515 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.