Skip to content

Commit

Permalink
fix: possible empty agency
Browse files Browse the repository at this point in the history
  • Loading branch information
janrembold committed Mar 8, 2024
1 parent 417afac commit ec9b2cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/session/SessionView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ export const SessionView = () => {

(async () => {
// TODO: move this to global jotai atom family
const { agencyLogo } = await apiGetAgencyById(agencyId);
const agency = await apiGetAgencyById(agencyId);

if (agencyLogo && !isCanceled) {
setAgencyLogo(agencyLogo);
if (agency?.agencyLogo && !isCanceled) {
setAgencyLogo(agency.agencyLogo);
}
})();

Expand Down

0 comments on commit ec9b2cd

Please sign in to comment.