Skip to content

Commit

Permalink
remove success when error
Browse files Browse the repository at this point in the history
  • Loading branch information
jcferrei committed Mar 14, 2024
1 parent 4ab2eb6 commit b80f829
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions resources/scripts/github-members.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,16 @@ confirmButton.addEventListener("click", function() {
.catch(error => {
console.error('There was a problem with your fetch operation:', error);
validation.innerHTML="We had a problem. Try again later or contact the administrator"
validation.classList.remove('success')
inputField.classList.remove('success')
validation.classList.add('error')
inputField.classList.add('error')
});
} else {
console.log(`User ${username} does not exist.`);
validation.innerHTML=`User ${username} does not exist.`
validation.classList.remove('success')
inputField.classList.remove('success')
validation.classList.add('error')
inputField.classList.add('error')
}
Expand Down

0 comments on commit b80f829

Please sign in to comment.