temporarily comment out bug
This commit is contained in:
parent
015a329778
commit
153cf62888
@ -68,7 +68,7 @@ Template.registerHelper('myClasses', () => {
|
|||||||
var courses = Meteor.user().profile.classes;
|
var courses = Meteor.user().profile.classes;
|
||||||
for(var i = 0; i < courses.length; i++) {
|
for(var i = 0; i < courses.length; i++) {
|
||||||
found = classes.findOne({_id:courses[i]});
|
found = classes.findOne({_id:courses[i]});
|
||||||
if (found) {
|
// if (found !== undefined) {
|
||||||
array.push(found);
|
array.push(found);
|
||||||
var thisWork = work.find({class: array.slice(-1)[0]}).fetch();
|
var thisWork = work.find({class: array.slice(-1)[0]}).fetch();
|
||||||
|
|
||||||
@ -77,17 +77,18 @@ Template.registerHelper('myClasses', () => {
|
|||||||
thisWork[j].typeColor = workColors[thisWork[j].type];
|
thisWork[j].typeColor = workColors[thisWork[j].type];
|
||||||
}
|
}
|
||||||
array[i].thisClassWork = thisWork;
|
array[i].thisClassWork = thisWork;
|
||||||
} else {
|
// } else {
|
||||||
invalid.push(i);
|
// console.log("invalid");
|
||||||
}
|
// invalid.push(i);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
for(var i = 0; i < invalid.length; i++) {
|
// for(var i = 0; i < invalid.length; i++) {
|
||||||
array.splice(invalid[i], 1);
|
// array.splice(invalid[i], 1);
|
||||||
courses.splice(invalid[i], 1);
|
// courses.splice(invalid[i], 1);
|
||||||
}
|
// }
|
||||||
userprofile = Meteor.user().profile;
|
// userprofile = Meteor.user().profile;
|
||||||
userprofile.classes = courses;
|
// userprofile.classes = courses;
|
||||||
Meteor.call("editProfile", userprofile);
|
// Meteor.call("editProfile", userprofile);
|
||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user