File tree Expand file tree Collapse file tree 3 files changed +6
-18
lines changed
language/workspace/language Expand file tree Collapse file tree 3 files changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -114,14 +114,10 @@ export class UmbDataTypeWorkspaceContext
114
114
}
115
115
116
116
protected override _checkWillNavigateAway ( newUrl : string ) : boolean {
117
- super . _checkWillNavigateAway ( newUrl ) ;
118
-
119
- const workspacePathBase = UMB_WORKSPACE_PATH_PATTERN . generateLocal ( { entityType : this . getEntityType ( ) } ) ;
120
-
121
117
if ( this . getIsNew ( ) ) {
122
- return ! newUrl . includes ( `${ workspacePathBase } /create` ) ;
118
+ return ! newUrl . includes ( `/create` ) || super . _checkWillNavigateAway ( newUrl ) ;
123
119
} else {
124
- return ! newUrl . includes ( `${ workspacePathBase } /edit/${ this . getUnique ( ) } ` ) ;
120
+ return ! newUrl . includes ( `/edit/${ this . getUnique ( ) } ` ) || super . _checkWillNavigateAway ( newUrl ) ;
125
121
}
126
122
}
127
123
Original file line number Diff line number Diff line change @@ -56,14 +56,10 @@ export class UmbLanguageWorkspaceContext
56
56
}
57
57
58
58
protected override _checkWillNavigateAway ( newUrl : string ) : boolean {
59
- super . _checkWillNavigateAway ( newUrl ) ;
60
-
61
- const workspacePathBase = UMB_WORKSPACE_PATH_PATTERN . generateLocal ( { entityType : this . getEntityType ( ) } ) ;
62
-
63
59
if ( this . getIsNew ( ) ) {
64
- return ! newUrl . includes ( `${ workspacePathBase } /create` ) ;
60
+ return ! newUrl . includes ( `/create` ) || super . _checkWillNavigateAway ( newUrl ) ;
65
61
} else {
66
- return ! newUrl . includes ( `${ workspacePathBase } /edit/${ this . getUnique ( ) } ` ) ;
62
+ return ! newUrl . includes ( `/edit/${ this . getUnique ( ) } ` ) || super . _checkWillNavigateAway ( newUrl ) ;
67
63
}
68
64
}
69
65
Original file line number Diff line number Diff line change @@ -56,14 +56,10 @@ export class UmbUserWorkspaceContext
56
56
}
57
57
58
58
protected override _checkWillNavigateAway ( newUrl : string ) : boolean {
59
- super . _checkWillNavigateAway ( newUrl ) ;
60
-
61
- const workspacePathBase = UMB_WORKSPACE_PATH_PATTERN . generateLocal ( { entityType : this . getEntityType ( ) } ) ;
62
-
63
59
if ( this . getIsNew ( ) ) {
64
- return ! newUrl . includes ( `${ workspacePathBase } /create` ) ;
60
+ return ! newUrl . includes ( `/create` ) || super . _checkWillNavigateAway ( newUrl ) ;
65
61
} else {
66
- return ! newUrl . includes ( `${ workspacePathBase } /edit/${ this . getUnique ( ) } ` ) ;
62
+ return ! newUrl . includes ( `/edit/${ this . getUnique ( ) } ` ) || super . _checkWillNavigateAway ( newUrl ) ;
67
63
}
68
64
}
69
65
You can’t perform that action at this time.
0 commit comments