fix bugs in profile architecture
This commit is contained in:
parent
6acb02aa7d
commit
9e8219b463
@ -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));
|
||||
|
||||
@ -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 [
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user