From 153cf62888b771f702fc7b7f7fa9f290baed76a3 Mon Sep 17 00:00:00 2001 From: Yaman Qalieh Date: Sun, 14 Aug 2016 08:22:39 -0400 Subject: [PATCH] temporarily comment out bug --- hourglass/client/main/main.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/hourglass/client/main/main.js b/hourglass/client/main/main.js index 2c11699..066e16b 100644 --- a/hourglass/client/main/main.js +++ b/hourglass/client/main/main.js @@ -68,7 +68,7 @@ Template.registerHelper('myClasses', () => { var courses = Meteor.user().profile.classes; for(var i = 0; i < courses.length; i++) { found = classes.findOne({_id:courses[i]}); - if (found) { + // if (found !== undefined) { array.push(found); var thisWork = work.find({class: array.slice(-1)[0]}).fetch(); @@ -77,17 +77,18 @@ Template.registerHelper('myClasses', () => { thisWork[j].typeColor = workColors[thisWork[j].type]; } array[i].thisClassWork = thisWork; - } else { - invalid.push(i); - } + // } else { + // console.log("invalid"); + // invalid.push(i); + // } } - for(var i = 0; i < invalid.length; i++) { - array.splice(invalid[i], 1); - courses.splice(invalid[i], 1); - } - userprofile = Meteor.user().profile; - userprofile.classes = courses; - Meteor.call("editProfile", userprofile); + // for(var i = 0; i < invalid.length; i++) { + // array.splice(invalid[i], 1); + // courses.splice(invalid[i], 1); + // } + // userprofile = Meteor.user().profile; + // userprofile.classes = courses; + // Meteor.call("editProfile", userprofile); return array; } });