From 4665682ea6a85315f901365cda5b1569b515c6bc Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 14 Nov 2014 07:34:09 -0800 Subject: [PATCH] Fixed: Exception when navigating away from series details view while it is still loading --- src/UI/Series/Details/SeriesDetailsLayout.js | 4 +++- src/UI/Shared/ControlPanel/ControlPanelController.js | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/UI/Series/Details/SeriesDetailsLayout.js b/src/UI/Series/Details/SeriesDetailsLayout.js index 628d4cda2..efbe83412 100644 --- a/src/UI/Series/Details/SeriesDetailsLayout.js +++ b/src/UI/Series/Details/SeriesDetailsLayout.js @@ -214,7 +214,9 @@ define( series : self.model }); - self.seasons.show(seasonCollectionView); + if (!self.isClosed) { + self.seasons.show(seasonCollectionView); + } }); }, diff --git a/src/UI/Shared/ControlPanel/ControlPanelController.js b/src/UI/Shared/ControlPanel/ControlPanelController.js index d09a34a4c..4e2a1100c 100644 --- a/src/UI/Shared/ControlPanel/ControlPanelController.js +++ b/src/UI/Shared/ControlPanel/ControlPanelController.js @@ -9,15 +9,15 @@ define( return Marionette.AppRouter.extend({ initialize: function () { - vent.on(vent.Commands.OpenControlPanelCommand, this._openModal, this); - vent.on(vent.Commands.CloseControlPanelCommand, this._closeModal, this); + vent.on(vent.Commands.OpenControlPanelCommand, this._openControlPanel, this); + vent.on(vent.Commands.CloseControlPanelCommand, this._closeControlPanel, this); }, - _openModal: function (view) { + _openControlPanel: function (view) { AppLayout.controlPanelRegion.show(view); }, - _closeModal: function () { + _closeControlPanel: function () { AppLayout.controlPanelRegion.closePanel(); } });