Skip to content

Commit 0004b3c

Browse files
committed
only check for the active local route
1 parent 4a48177 commit 0004b3c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/packages/core/workspace/entity-detail/entity-detail-workspace-base.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { UmbSubmittableWorkspaceContextBase } from '../submittable/index.js';
22
import { UmbEntityWorkspaceDataManager } from '../entity/entity-workspace-data-manager.js';
3-
import { UMB_WORKSPACE_PATH_PATTERN } from '../paths.js';
43
import { UMB_ACTION_EVENT_CONTEXT } from '@umbraco-cms/backoffice/action';
54
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
65
import type { UmbEntityModel, UmbEntityUnique } from '@umbraco-cms/backoffice/entity';
@@ -153,9 +152,7 @@ export abstract class UmbEntityDetailWorkspaceContextBase<
153152
* @memberof UmbEntityWorkspaceContextBase
154153
*/
155154
protected _checkWillNavigateAway(newUrl: string) {
156-
const workspaceBasePath = UMB_WORKSPACE_PATH_PATTERN.generateLocal({ entityType: this.getEntityType() });
157-
const currentWorkspacePathIdentifier = '/' + workspaceBasePath + '/' + this.routes.getActiveLocalPath();
158-
return !newUrl.includes(currentWorkspacePathIdentifier);
155+
return !newUrl.includes(this.routes.getActiveLocalPath());
159156
}
160157

161158
async #create(currentData: DetailModelType) {

0 commit comments

Comments
 (0)