File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
projects/netgrif-components-core/src/lib/view/task-view Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,12 @@ export abstract class AbstractSingleTaskViewComponent extends AbstractViewWithHe
20
20
public taskPanelData : ReplaySubject < TaskPanelData > ;
21
21
public loading$ : Observable < boolean > ;
22
22
private transitionId : string ;
23
- private subRoute : Subscription ;
23
+ private subRoute : Subscription | undefined ;
24
24
protected subPanelData : Subscription ;
25
25
26
26
protected constructor ( protected taskViewService : TaskViewService ,
27
27
activatedRoute : ActivatedRoute ) {
28
28
super ( taskViewService , activatedRoute ) ;
29
- this . subPanelData = new Subscription ( ) ;
30
29
this . taskPanelData = new ReplaySubject < TaskPanelData > ( 1 ) ;
31
30
this . subRoute = this . _activatedRoute . paramMap . subscribe ( paramMap => {
32
31
if ( ! ! ( paramMap ?. [ 'params' ] ?. [ TaskConst . TRANSITION_ID ] ) ) {
@@ -45,7 +44,9 @@ export abstract class AbstractSingleTaskViewComponent extends AbstractViewWithHe
45
44
ngOnDestroy ( ) {
46
45
super . ngOnDestroy ( ) ;
47
46
this . subRoute . unsubscribe ( ) ;
48
- this . subPanelData . unsubscribe ( ) ;
47
+ if ( ! ! this . subPanelData ) {
48
+ this . subPanelData . unsubscribe ( ) ;
49
+ }
49
50
}
50
51
51
52
get task$ ( ) : Observable < TaskPanelData > {
You can’t perform that action at this time.
0 commit comments