From b57fe500912ff30fe6c7c77eb681038237fbfa9e Mon Sep 17 00:00:00 2001 From: Matthieu BARBE Date: Sun, 10 Feb 2019 16:43:01 +0100 Subject: [PATCH] - correction de la condition --- .gitignore | 2 ++ src/App.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0a6ff6e..bfee9a1 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* .vscode/chrome + +\.idea/ diff --git a/src/App.js b/src/App.js index a0cb6e9..bae9777 100644 --- a/src/App.js +++ b/src/App.js @@ -75,7 +75,7 @@ class App extends Component { const newGuesses = guesses + 1 const matched = cards[newPair[0]] === cards[newPair[1]] this.setState({ currentPair: newPair, guesses: newGuesses }) - if (matched && newPair[0] != newPair[1]) { + if (matched && newPair[0] !== newPair[1]) { this.setState({ matchedCardIndices: [...matchedCardIndices, ...newPair] }) } setTimeout(() => this.setState({ currentPair: [] }), VISUAL_PAUSE_MSECS)