Skip to content

Commit

Permalink
Fix new users nuking their deck when opening Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Apr 18, 2018
1 parent acc9d96 commit 59b6c7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions views/ElementSelect.js
Expand Up @@ -36,6 +36,8 @@ module.exports = class ElementSelect extends React.Component {
delete data.x;
sock.user = data;
store.store.dispatch(store.setOptTemp('selectedDeck', data.selectedDeck));
store.store.dispatch(store.setOptTemp('deckname', data.selectedDeck));
store.store.dispatch(store.setOptTemp('deck', sock.getDeck()));
store.store.dispatch(store.doNav(require('./MainMenu')));
}
}));
Expand Down
2 changes: 1 addition & 1 deletion views/Login.js
Expand Up @@ -26,7 +26,7 @@ if (typeof kongregateAPI === 'undefined') {
this.props.dispatch(store.doNav(require('./ElementSelect')));
} else {
this.props.dispatch(store.setOptTemp('selectedDeck', data.selectedDeck));
this.props.dispatch(store.setOptTemp('deckname', data.deckname));
this.props.dispatch(store.setOptTemp('deckname', data.selectedDeck));
this.props.dispatch(store.setOptTemp('deck', sock.getDeck()));
this.props.dispatch(store.doNav(require('./MainMenu')));
}
Expand Down

0 comments on commit 59b6c7f

Please sign in to comment.