Skip to content

Conversation

@dewanshDT
Copy link

search bug fixed

when the search query was deleted or emptied, react always gives this error
Screenshot from 2021-10-08 00-04-26

This is now fixed. Check out the code changes, I hope it helped.

@netlify
Copy link

netlify bot commented Oct 7, 2021

✔️ Deploy Preview for wizardly-hoover-38f71b ready!

🔨 Explore the source changes: 82c658e

🔍 Inspect the deploy log: https://app.netlify.com/sites/wizardly-hoover-38f71b/deploys/615f419e699f4a000880d0e1

😎 Browse the preview: https://deploy-preview-155--wizardly-hoover-38f71b.netlify.app/

srsearch: term
},
});
setResults(data.query.search);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here it was setting the search results even if the query is empty and data.query.search is undefined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant