From fd9a41b352a9c509c45c718f1bb76b3d8ad77916 Mon Sep 17 00:00:00 2001 From: Kevin Dao Date: Wed, 29 Aug 2018 11:36:46 -0500 Subject: [PATCH] Updated to match upstream branch --- js/content.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/content.js b/js/content.js index 1f4cfa7d..9947eb73 100644 --- a/js/content.js +++ b/js/content.js @@ -217,7 +217,12 @@ function getCourseInfo(row) { /*Handle if on the individual course page, ie if the textbook button exists*/ if ($("#textbook_button").length) { coursename = $("#details h2").text(); - profinit = $("table").find("td[data-th='Instructor']").text().split(", ")[1].substring(0, 1); + var gotname = $("table").find("td[data-th='Instructor']").text(); + if (gotname != "") { + profinit = $("table").find("td[data-th='Instructor']").text().split(", ")[1].substring(0, 1); + } else { + profinit = ""; + } profurl = document.URL; console.log(profurl); }