prevent useless rerenders when updatingEnv on unmounted component

fix #4
This commit is contained in:
Géry Debongnie
2019-03-21 10:37:49 +01:00
parent b446d5d338
commit d799e3dd47
2 changed files with 26 additions and 1 deletions
+3 -1
View File
@@ -280,7 +280,9 @@ export class Component<
this.env = Object.create(this.env);
}
Object.assign(this.env, nextEnv);
return this.render();
if (this.__widget__.isMounted) {
return this.render();
}
}
async updateProps(nextProps: Props): Promise<void> {