@@ -111,7 +111,10 @@ export const validatorRouter = router({
111111 if ( option . type === 'course' || option . type === 'other' ) {
112112 // 'other' might be an improperly parsed course
113113 // if it's not, `course` will be set to undefined so nothing will happen
114- const course = option . type === 'course' ? courseMapWithIdKey . get ( option . class_reference ) : option . description . match ( re ) ?. [ 0 ] ;
114+ const course =
115+ option . type === 'course'
116+ ? courseMapWithIdKey . get ( option . class_reference )
117+ : option . description . match ( re ) ?. [ 0 ] ;
115118 if ( course ) {
116119 const data = courseHash . get ( course as string ) ;
117120 if ( data === undefined ) {
@@ -156,14 +159,17 @@ export const validatorRouter = router({
156159 if ( option . type === 'course' || option . type === 'other' ) {
157160 // 'other' might be an improperly parsed course
158161 // if it's not, `course` will be set to undefined so nothing will happen
159- const course = option . type === 'course' ? courseMapWithIdKey . get ( option . class_reference ) : option . description . match ( re ) ?. [ 0 ] ;
162+ const course =
163+ option . type === 'course'
164+ ? courseMapWithIdKey . get ( option . class_reference )
165+ : option . description . match ( re ) ?. [ 0 ] ;
160166 if ( course ) {
161167 const data = courseHash . get ( course as string ) ;
162168 if ( data === undefined ) {
163169 temp [ 0 ] . push ( course as string ) ;
164170 continue ;
165171 }
166- if ( data == = semester ) {
172+ if ( data < = semester ) {
167173 count ++ ;
168174 } else {
169175 temp [ 0 ] . push ( course as string ) ;
@@ -202,7 +208,10 @@ export const validatorRouter = router({
202208 if ( option . type === 'course' || option . type === 'other' ) {
203209 // 'other' might be an improperly parsed course
204210 // if it's not, `course` will be set to undefined so nothing will happen
205- const course = option . type === 'course' ? courseMapWithIdKey . get ( option . class_reference ) : option . description . match ( re ) ?. [ 0 ] ;
211+ const course =
212+ option . type === 'course'
213+ ? courseMapWithIdKey . get ( option . class_reference )
214+ : option . description . match ( re ) ?. [ 0 ] ;
206215 if ( course ) {
207216 const data = courseHash . get ( course as string ) ;
208217 if ( data === undefined ) {
0 commit comments