Skip to content

Commit

Permalink
district-finder: Add validation message
Browse files Browse the repository at this point in the history
  • Loading branch information
earthboundkid committed Sep 19, 2024
1 parent 1524301 commit 5498785
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assets/js/district-finder.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ Alpine.data("app", () => {
if (this.isLoading) {
return;
}
if (!this.address) {
this.error = new Error("Please enter address.");
return;
}
this.isLoading = true;

return callAPI("/api/candidates-by-address", {
Expand Down

0 comments on commit 5498785

Please sign in to comment.