Skip to content

Commit

Permalink
fix(abc:notice-icon): fix incorrect unsubscription
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Apr 12, 2024
1 parent 1ff2ddb commit 567683f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/abc/notice-icon/notice-icon.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import { NoticeIconSelect, NoticeItem } from './notice-icon.types';
export class NoticeIconComponent implements OnInit, OnChanges, OnDestroy {
private readonly i18n = inject(DelonLocaleService);
private readonly cdr = inject(ChangeDetectorRef);
private i18n$!: Subscription;
private i18n$?: Subscription;
locale: LocaleData = {};

@Input() data: NoticeItem[] = [];
Expand Down Expand Up @@ -94,6 +94,6 @@ export class NoticeIconComponent implements OnInit, OnChanges, OnDestroy {
}

ngOnDestroy(): void {
this.i18n$.unsubscribe();
this.i18n$?.unsubscribe();
}
}

0 comments on commit 567683f

Please sign in to comment.