Fix "'Cannot set property 'forwardViewId' of undefined'"

As found here:
http://forum.ionicframework.com/t/cannot-set-property-forwardviewid-of-undefined/15512/2
This commit is contained in:
Robert (Jamie) Munro
2015-02-09 11:31:53 +00:00
parent d8bc155817
commit f949a44d41

View File

@@ -391,6 +391,10 @@ function($rootScope, $state, $location, $window, $timeout, $ionicViewSwitcher, $
if (hist.stack[x].viewId == viewId) {
action = 'dupNav';
direction = DIRECTION_NONE;
if (x != 0) {
hist.stack[x - 1].forwardViewId = null;
}
viewHistory.forwardView = null;
hist.stack[x - 1].forwardViewId = viewHistory.forwardView = null;
viewHistory.currentView.index = viewHistory.backView.index;
viewHistory.currentView.backViewId = viewHistory.backView.backViewId;