1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +02:00

Move drawer hide and modal close into onNewRoute

Let's stay consistent with previous behavior, and run these on "internal route change" (same component handles different route) as well as on initial render of a page component.
This commit is contained in:
Alexander Skvortsov
2020-10-05 16:25:23 -04:00
parent 6ff50874fa
commit 6c8173a953

View File

@@ -12,9 +12,6 @@ export default class Page extends Component {
this.onNewRoute();
app.drawer.hide();
app.modal.close();
/**
* A class name to apply to the body while the route is active.
*
@@ -32,6 +29,9 @@ export default class Page extends Component {
onNewRoute() {
app.previous = app.current;
app.current = new PageState(this.constructor, { routeName: this.attrs.routeName });
app.drawer.hide();
app.modal.close();
}
oncreate(vnode) {