Skip to content

Commit

Permalink
Catch errors when fetching participant data
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasnaphas committed Mar 31, 2023
1 parent 39062fc commit a946bea
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions frontend/src/components/SedersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,15 @@ function SedersPage({
fetch(participantLinkDataUrl, { credentials: "include" });
then((r) => {
return r.json();
}).then((ld) => {
if (Array.isArray(ld)) {
setParticipantLinkData(ld);
}
});
})
.then((ld) => {
if (Array.isArray(ld)) {
setParticipantLinkData(ld);
}
})
.catch((err) => {
console.log(err);
});
}, [user]);
const seders = new Map();
sedersIStarted.forEach((seder) => {
Expand Down

0 comments on commit a946bea

Please sign in to comment.