[O] Optimize code length

This commit is contained in:
Hykilpikonna
2020-08-01 16:19:17 -04:00
parent 73a651f3aa
commit 641778b169
@@ -44,8 +44,7 @@ export default class CourseScatter extends Vue
formatter: (name: any) => moment(name).format('MMM DD')
},
min: Constants.TERMS[term == -1 ? 0 : term].getTime(),
max: term == -1 ?
moment.min(moment(), moment(Constants.TERMS[4])).toDate().getTime() :
max: term == -1 ? moment.min(moment(), moment(Constants.TERMS[4])).toDate().getTime() :
Constants.TERMS[term + 1].getTime()
},