HOT-FIX: Исправлена работа RoutesPagesContainer

This commit is contained in:
2020-07-16 13:08:08 +03:00
parent 8ef0e49948
commit 7a56fcc777

View File

@ -41,13 +41,13 @@ class RouterPagesContainer extends Component {
return route.url === url;
}) || {};
// Рендерит новую страницу, если url изменился
if (url !== this.currentUrl) {
// Удаляет предыдущую страницу
if (this.currentPage) {
this.currentPage.destroy();
}
// Рендерит новую страницу, если url изменился
if (url !== this.currentUrl) {
this.currentUrl = url;
this.currentPage = new PageComponent('#page', this.mainNode);
}