Skip to content

Commit

Permalink
fix(history): index check before forwardViewId = null
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Feb 11, 2015
1 parent bcc4eeb commit 2885258
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/angular/service/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,10 @@ function($rootScope, $state, $location, $window, $timeout, $ionicViewSwitcher, $
if (hist.stack[x].viewId == viewId) {
action = 'dupNav';
direction = DIRECTION_NONE;
if (x != 0) {
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;
viewHistory.backView = getBackView(viewHistory.backView);
Expand Down

0 comments on commit 2885258

Please sign in to comment.