Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7e57e2d

Browse files
committed
refactor: safe ?.unsubscribe() from subscriptions
1 parent276ff91 commit7e57e2d

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

‎projects/coreui-angular/src/lib/dropdown/dropdown-menu/dropdown-menu.directive.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export class DropdownMenuDirective implements OnInit, OnDestroy {
7878
}
7979
});
8080
}else{
81-
this.dropdownStateSubscription.unsubscribe();
81+
this.dropdownStateSubscription?.unsubscribe();
8282
}
8383
}
8484
}

‎projects/coreui-angular/src/lib/dropdown/dropdown/dropdown.component.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ export class DropdownComponent implements AfterContentInit, OnChanges, OnDestroy
312312
}
313313
});
314314
}else{
315-
this.dropdownStateSubscription.unsubscribe();
315+
this.dropdownStateSubscription?.unsubscribe();
316316
}
317317
}
318318

‎projects/coreui-angular/src/lib/modal/modal/modal.component.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ export class ModalComponent implements OnInit, OnDestroy {
276276
}
277277
);
278278
}else{
279-
this.stateToggleSubscription.unsubscribe();
279+
this.stateToggleSubscription?.unsubscribe();
280280
}
281281
}
282282

‎projects/coreui-angular/src/lib/offcanvas/offcanvas/offcanvas.component.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ export class OffcanvasComponent implements OnInit, OnDestroy {
269269
}
270270
});
271271
}else{
272-
this.#stateToggleSubscription.unsubscribe();
272+
this.#stateToggleSubscription?.unsubscribe();
273273
}
274274
}
275275

‎projects/coreui-angular/src/lib/sidebar/sidebar-nav/sidebar-nav-link.component.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export class SidebarNavLinkComponent implements OnInit, OnDestroy {
9595
}
9696

9797
ngOnDestroy():void{
98-
this.navSubscription.unsubscribe();
98+
this.navSubscription?.unsubscribe();
9999
}
100100

101101
publicgetLinkType():string{

‎projects/coreui-angular/src/lib/sidebar/sidebar-nav/sidebar-nav.component.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export class SidebarNavGroupComponent implements OnInit, OnDestroy {
161161
}
162162

163163
ngOnDestroy():void{
164-
this.navSubscription.unsubscribe();
164+
this.navSubscription?.unsubscribe();
165165
}
166166

167167
onAnimationStart($event:AnimationEvent){

‎projects/coreui-angular/src/lib/sidebar/sidebar/sidebar.component.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ export class SidebarComponent implements OnChanges, OnDestroy, OnInit {
285285
}
286286
);
287287
}else{
288-
this.#layoutChangeSubscription.unsubscribe();
288+
this.#layoutChangeSubscription?.unsubscribe();
289289
}
290290
}
291291
}

‎projects/coreui-angular/src/lib/toast/toaster/toaster.component.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export class ToasterComponent implements OnDestroy, OnInit, AfterContentChecked
169169
}
170170
});
171171
}else{
172-
this.stateToasterSubscription.unsubscribe();
172+
this.stateToasterSubscription?.unsubscribe();
173173
}
174174
}
175175
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp