From 0ab2272512cbe485712592b462cd15365f2836c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diogo=20Silv=C3=A9rio?= Date: Sun, 28 Jan 2018 23:22:00 -0200 Subject: [PATCH] FIX: Reset bug fixed By reseting/restarting a new deck, the reset function corrupted the screen state, thus corrupting application storage as well :| --- components/flashcards/NewDeck.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/flashcards/NewDeck.js b/components/flashcards/NewDeck.js index 1368ac6..ca8ca13 100644 --- a/components/flashcards/NewDeck.js +++ b/components/flashcards/NewDeck.js @@ -38,7 +38,10 @@ class NewDeck extends Component { deck: { name: '', description: '', - difficulty: 0 + difficulty: 0, + cards: [], + won: 0, + lost: 0 } }); } @@ -53,7 +56,7 @@ class NewDeck extends Component { { cancelable: false }); return; } - + persistDeck(this.state.deck); this.props.dispatch(newDeck(this.state.deck));