fix bugs in profile architecture

This commit is contained in:
Yaman Qalieh 2016-09-29 23:51:49 -04:00
parent 6acb02aa7d
commit 9e8219b463
3 changed files with 3 additions and 3 deletions

View File

@ -622,7 +622,7 @@ function getProfileData() { // Gets all data related to profile.
if(profile.description.includes("Say something about yourself!")) profile.description = "";
profile.school = document.getElementById("school").childNodes[0].nodeValue;
if(profile.school === "Click here to edit...") school = "";
if(profile.school === "Click here to edit...") profile.school = "";
var gradein = document.getElementById("grade").childNodes[0].nodeValue;
profile.grade = parseInt(gradein.substring(gradein.length - 2, gradein));

View File

@ -1,6 +1,6 @@
Router.route('/', {
waitOn: function() {
if (!Meteor.userId() || !Meteor.user().profile.school) {
if (!Meteor.userId() || _.contains([null, undefined, ""], Meteor.user().profile.school)) {
this.redirect('/login');
} else {
return [

View File

@ -508,7 +508,7 @@ Meteor.methods({
current.banner = "/Banners/defaultcover.jpg";
current.classes = [userId];
current.preferences = {
"theme": "light",
"theme": themeColors.light,
"mode": "classes",
"timeHide": 1,
"done": true,