Skip to content

Commit

Permalink
Merge branch 'main' into frankreed/fix_assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankreedX committed Aug 17, 2024
2 parents b015d1f + fc07050 commit 20cbc61
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions dbOperations/hooks/useUserInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,15 @@ export const useUserInfo = ({
...data,
assigned_data: filteredAssignedData,
};
await updateDoc(
doc(db, "teams", currentTeamId, "users", userId),
updatedData,
);
return updatedData;
try {
await updateDoc(
doc(db, "teams", currentTeamId, "users", userId),
updatedData,
);
return updatedData;
} catch (e) {
console.log("can't clear old assignments", getErrorString(e));
}
}
return data;
} else if (role) {
Expand Down

0 comments on commit 20cbc61

Please sign in to comment.