Skip to content

Commit

Permalink
If Fweet input is empty.. do not try and create Fweet
Browse files Browse the repository at this point in the history
Added a check to see if the fweet input is empty.. and if so, just return.
  • Loading branch information
dihmeetree committed Apr 23, 2020
1 parent 5e90105 commit 12fe506
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/fweeter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ const Fweeter = props => {

const handleSubmit = event => {
event.preventDefault()

if (!fweet) return
props.handleCreateFweet(fweet, asset).then(e => {
setFweet('')
setAsset(null)
Expand Down

0 comments on commit 12fe506

Please sign in to comment.