You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've upgraded our Angular app and NG-ZORRO-ANTD to v9. What worked fine before (in 8.5.2), that is calling NzMessageService instance's remove() without an argument when no messages have been created yet, throws this.container is undefined in 9.0.2.
Once at least one Message has been created, the remove() call works fine.
The expected behavior is for remove() to have no effect on a blank slate.
Sample code to reproduce
import{Component}from"@angular/core";import{NzMessageService}from"ng-zorro-antd/message";
@Component({selector: "app-root",templateUrl: "./app.component.html",styleUrls: ["./app.component.less"]})exportclassAppComponentimplementsOnInit{title="It's over Anakin, I have the high ground!";constructor(privatemessage: NzMessageService){}ngOnInit(): void{this.message.remove();// throws "this.container is undefined" in "this.container.removeAll()" code path}}
The text was updated successfully, but these errors were encountered:
Versions
NG-ZORRO-ANTD:
9.0.2
Angular:
9.1.3
Description
I've upgraded our Angular app and NG-ZORRO-ANTD to v9. What worked fine before (in
8.5.2
), that is callingNzMessageService
instance'sremove()
without an argument when no messages have been created yet, throwsthis.container is undefined
in9.0.2
.Once at least one Message has been created, the
remove()
call works fine.The expected behavior is for
remove()
to have no effect on a blank slate.Sample code to reproduce
The text was updated successfully, but these errors were encountered: