From 50c7e0468bbb562469b0f6bfddcf57335a5bb374 Mon Sep 17 00:00:00 2001 From: Derek Chen Date: Sat, 29 Apr 2023 05:30:50 -0500 Subject: [PATCH] meh --- main.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/main.js b/main.js index 4589d6e..d21b2ce 100644 --- a/main.js +++ b/main.js @@ -64,7 +64,7 @@ async function PapaParse(department, num, name, sem) { .then(data => { cData = data; }); let selectedClass = cData.filter(cData => cData["Course Prefix"].includes(department)) - .filter(handleSummer(cData, sem)) + .filter(cData => cData["Course Number"] == num.toString().toUpperCase()) .filter(cData => cData["Course Title"].includes(name)); if(selectedClass.length == 0) { // Possible that the class name was typed wrong; try again with just the course number @@ -121,13 +121,6 @@ async function PapaParse(department, num, name, sem) { } } -function handleSummer(cData, sem) { - if(sem.includes("sum")) { - return cData["Course Number"].includes(num.toString().toUpperCase()); - } else { - return cData["Course Number"] == num.toString().toUpperCase(); - } -} function loadChart(gradeDist, courseName) { gradeChart = new Chart(ctx, { type: 'bar',