Skip to content

Commit

Permalink
fix(board): return null if organization doesnt exist (#1841)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilielr authored Mar 10, 2025
1 parent 9788d77 commit ce43e6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tavla/src/Board/scenarios/Board/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export async function getOrganizationWithBoard(bid: TBoardID) {
const org = ref.docs.map(
(doc) => ({ id: doc.id, ...doc.data() }) as TOrganization,
)
return org[0]
return org[0] ?? null
} catch (error) {
Sentry.captureMessage('Failed to fetch organization with board ' + bid)
throw error
Expand Down

0 comments on commit ce43e6f

Please sign in to comment.