fix: instructor formatting errors (#425)
* fix: instructor formatting errors * refactor: simplify logic in Instructor toString, remove unused formatters * refactor: remove "unnecessary" else's after returns I think it looks worse like this but whatever
This commit is contained in:
@@ -98,9 +98,7 @@ function extractCourseInfo(course: Course) {
|
||||
|
||||
if (course.instructors.length > 0) {
|
||||
courseDeptAndInstr += ' \u2013 ';
|
||||
courseDeptAndInstr += course.instructors
|
||||
.map(instructor => instructor.toString({ format: 'last', case: 'capitalize' }))
|
||||
.join('; ');
|
||||
courseDeptAndInstr += course.instructors.map(instructor => instructor.toString({ format: 'last' })).join('; ');
|
||||
}
|
||||
|
||||
return { status, courseDeptAndInstr, meetings, course };
|
||||
|
||||
Reference in New Issue
Block a user