Skip to content

Commit

Permalink
This might fix the issue. I need to install Sentry.io or something to…
Browse files Browse the repository at this point in the history
… actually find the error and how it happens.
  • Loading branch information
AlecDusheck committed Oct 25, 2018
1 parent 8c94b26 commit 2cc760e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server/util/ephsCoreBridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,12 @@ module.exports.getSignedupSessions = function (callback, sessID) {
$(this.children).each(function () {
if (this.name === "td") {
if (i === 0) { //Ok, the first td is the plus button, and the second is a useless info button.
let jsFunction = $(this.children[0]).attr('onclick'); //Get the first child (the image) and get the javascript
classData["id"] = jsFunction.substring((getPosition(jsFunction, "'", 1) + 1), getPosition(jsFunction, "'", 2));
try{
let jsFunction = $(this.children[0]).attr('onclick'); //Get the first child (the image) and get the javascript
classData["id"] = jsFunction.substring((getPosition(jsFunction, "'", 1) + 1), getPosition(jsFunction, "'", 2));
}catch (e) {
classData["id"] = 0;
}
} else if (i === 1) { //Ok, this is the info button. We need a little bit of data from here.
classData["classroom"] = $(this.children[0]).attr('classroom');
}else if (i >= 2) {
Expand Down

0 comments on commit 2cc760e

Please sign in to comment.