mirror of
https://github.com/flarum/framework.git
synced 2024-12-05 00:43:39 +08:00
Only do double redraw if there is a component we need to get rid of
This commit is contained in:
parent
25ca1135b2
commit
e86b796fa4
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user