Skip to content

Commit

Permalink
fix(module:message): fix message remove error when no container (#5123)
Browse files Browse the repository at this point in the history
close #5121
  • Loading branch information
Yadong Xie authored Apr 24, 2020
1 parent 82618c2 commit 1eca795
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions components/message/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ export abstract class NzMNService {
constructor(protected nzSingletonService: NzSingletonService, protected overlay: Overlay, private injector: Injector) {}

remove(id?: string): void {
if (id) {
this.container.remove(id);
} else {
this.container.removeAll();
if (this.container) {
if (id) {
this.container.remove(id);
} else {
this.container.removeAll();
}
}
}

Expand Down

0 comments on commit 1eca795

Please sign in to comment.