HOT-FIX: Исправлена работа RoutesPagesContainer
This commit is contained in:
@ -41,13 +41,13 @@ class RouterPagesContainer extends Component {
|
|||||||
return route.url === url;
|
return route.url === url;
|
||||||
}) || {};
|
}) || {};
|
||||||
|
|
||||||
// Удаляет предыдущую страницу
|
|
||||||
if (this.currentPage) {
|
|
||||||
this.currentPage.destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Рендерит новую страницу, если url изменился
|
// Рендерит новую страницу, если url изменился
|
||||||
if (url !== this.currentUrl) {
|
if (url !== this.currentUrl) {
|
||||||
|
// Удаляет предыдущую страницу
|
||||||
|
if (this.currentPage) {
|
||||||
|
this.currentPage.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
this.currentUrl = url;
|
this.currentUrl = url;
|
||||||
this.currentPage = new PageComponent('#page', this.mainNode);
|
this.currentPage = new PageComponent('#page', this.mainNode);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user