Update BaseModel.ts

This commit is contained in:
Xuan Sang LE 2020-06-25 14:56:07 +02:00 committed by GitHub
parent b54fdbedf6
commit c19fc26686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -342,8 +342,11 @@ namespace OS {
const evt = new BaseEvent("exit", force);
this.onexit(evt);
if (!evt.prevent) {
this.observable.off("*");
delete this._observable;
if(this.observable)
{
this.observable.off("*");
delete this._observable;
}
if (this.dialog) {
this.dialog.quit();
}