Skip to content

Commit

Permalink
Discard states if we've navigated back and added more
Browse files Browse the repository at this point in the history
  • Loading branch information
lsmoura committed Feb 27, 2018
1 parent d95ba16 commit aa53eb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parts/SubState.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default class SubState extends PubSub {

// Updates the state history array and sets the currentState pointer properly
pushState(newState) {
this.stateStorage = this.stateStorage.concat(newState);
this.stateStorage = this.stateStorage.slice(0, this.currentState).concat(newState);
this.currentState = this.stateStorage.length;
}

Expand Down

0 comments on commit aa53eb6

Please sign in to comment.