1
0
mirror of https://github.com/flarum/core.git synced 2025-07-27 11:40:24 +02:00

Only do double redraw if there is a component we need to get rid of

This commit is contained in:
Toby Zerner
2015-05-23 08:35:12 +09:30
parent c4614788c6
commit 1dc036da65

View File

@@ -218,8 +218,10 @@ class Composer extends Component {
// old composer will remain. To prevent this from happening, we clear the
// component and force a redraw, so that the new component will be working
// on a blank slate.
this.component = null;
m.redraw(true);
if (this.component) {
this.clear();
m.redraw(true);
}
this.component = component;
}
}