Skip to content

Commit

Permalink
Enrollment in a course run without a course page crashes the dashboard (
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-at-mit authored Jul 17, 2024
1 parent 50e4711 commit 78892e1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frontend/public/src/components/EnrolledItemCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,10 @@ export class EnrolledItemCard extends React.Component<

const onUnenrollClick = partial(this.onDeactivate.bind(this), [enrollment])
const courseId = enrollment.run.course_number
const pageLocation = enrollment.run.course.page.live ?
enrollment.run.course.page :
null
const pageLocation =
enrollment.run.course.page && enrollment.run.course.page.live ?
enrollment.run.course.page :
null
const menuTitle = `Course options for ${enrollment.run.course.title}`

const courseRunStatusMessageText = courseRunStatusMessage(enrollment.run)
Expand Down

0 comments on commit 78892e1

Please sign in to comment.