Skip to content

Commit

Permalink
fix an eslint error
Browse files Browse the repository at this point in the history
it thought I was trying to coerce a value to a number by multiplying it by one
  • Loading branch information
hawkrives committed Jul 22, 2018
1 parent 6fb157f commit 2940f17
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions modules/gob-web/modules/course-table/semester.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,8 @@ function Semester(props) {

// `recommendedCredits` is 4 for fall/spring and 1 for everything else
const creditsPerCourse = 1
const recommendedCredits =
semester === 1 || semester === 3
? creditsPerCourse * 4
: creditsPerCourse * 1
let recommendedCredits = semester === 1 || semester === 3 ? 4 : 1
let recommendedSlots = creditsPerCourse * recommendedCredits
const currentCredits = countCredits(courses || [])

const infoBar = []
Expand Down Expand Up @@ -166,7 +164,7 @@ function Semester(props) {
<CourseList
courses={courses || []}
usedSlots={currentCredits / creditsPerCourse}
maxSlots={recommendedCredits / creditsPerCourse}
maxSlots={recommendedSlots / creditsPerCourse}
studentId={studentId}
schedule={schedule}
conflicts={conflicts || []}
Expand Down

0 comments on commit 2940f17

Please sign in to comment.