Skip to content

Commit f60f031

Browse files
committed
fix: pass sem1_col and sem2_col into getCourses
`sem1_col` and `sem2_col` were initially undefined in this function. Adding parameters for them and passing them as arguments fixes this. I additionally fixed whitespace issues identified by the CI/CD pipeline. Signed-off-by: Lucas Sta Maria <[email protected]>
1 parent 85a4149 commit f60f031

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/js/saspowerschoolff.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@
2929
import $ from 'jquery';
3030
const browser = require('webextension-polyfill');
3131

32-
import {
32+
import {
3333
calculate_gpa,
3434
extractFinalPercent,
3535
gradeToGPA,
3636
analytics_message,
37-
saveGradesLocally } from './helpers';
37+
saveGradesLocally
38+
} from './helpers';
3839

3940
// Vue Components
4041
import Vue from 'vue';
@@ -80,7 +81,7 @@ function main_page () {
8081
const { sem1_col, sem2_col } = getSemesterCols();
8182
const second_semester = isSecondSemester();
8283
const current_term = getCurrentTerm();
83-
const courses = getCourses(second_semester);
84+
const courses = getCourses(second_semester, sem1_col, sem2_col);
8485

8586
showCurrentGPA(second_semester, courses);
8687

@@ -212,9 +213,11 @@ function getCurrentTerm () {
212213
/**
213214
* Returns an array of the current courses of the user and creates Vue objects for the courses.
214215
* @param second_semester If the current semester is the second semester
216+
* @param sem1_col The column of the first semester
217+
* @param sem2_col The column of the second semester
215218
* @returns {Course[]} array of Course objects representing the Courses of the user
216219
*/
217-
function getCourses(second_semester) {
220+
function getCourses (second_semester, sem1_col, sem2_col) {
218221
const $grade_rows = $('#quickLookup table.grid').find('tr');
219222
const courses = [];
220223

0 commit comments

Comments
 (0)