Skip to content

Commit

Permalink
Merge pull request #2 from Oggy107/master
Browse files Browse the repository at this point in the history
Fixed: Bug
  • Loading branch information
CamiloBarros committed Feb 16, 2022
2 parents c4ce1a6 + 4d210f4 commit 82a7279
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function useSearch (setLocalState) {

const handleKeyPress = (event) => {
if (event.key === 'Enter') {
if (search !== '') {
if (search.trim() !== '') {
fetchPokemon(search.toLowerCase())
.then(
data => {
Expand Down

0 comments on commit 82a7279

Please sign in to comment.