Skip to content

Commit

Permalink
fix: undefined company on getSession (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
nalves599 authored Apr 16, 2024
1 parent c82aa5b commit 44efc14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/resources/deck.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ async function getSessions(edition, withoutAchievements) {

async function getSession(sessionId) {
const session = await axios.get(`${DECK_API_URL}/public/sessions/${sessionId}`)
session.data.company.participation?.sort((a, b) => b.event - a.event) // Sort by event in descending order
session.data.speaker.forEach(speaker => speaker.participation?.sort((a, b) => b.event - a.event)) // Sort by event in descending order
session.data.company?.participation?.sort((a, b) => b.event - a.event) // Sort by event in descending order
session.data.speaker?.forEach(speaker => speaker.participation?.sort((a, b) => b.event - a.event)) // Sort by event in descending order
return transformSession(session.data)
}

Expand Down

0 comments on commit 44efc14

Please sign in to comment.