diff --git a/hourglass/client/login/login.css b/hourglass/client/login/login.css index d18e05d..0ee97aa 100644 --- a/hourglass/client/login/login.css +++ b/hourglass/client/login/login.css @@ -129,6 +129,7 @@ p.text { #github { font-size: 150%; + color: #000 !important; margin: 0; padding: 1%; diff --git a/hourglass/client/main/main.js b/hourglass/client/main/main.js index 931b61a..2313f43 100644 --- a/hourglass/client/main/main.js +++ b/hourglass/client/main/main.js @@ -157,6 +157,7 @@ Template.registerHelper('myClasses', () => { // Gets all classes and respective }); Template.registerHelper('pref', (val) => { // Obtains all user preferences. + if(Meteor.user() === null) return; var preferences = Meteor.user().profile.preferences; if(val === 'timeHide' || val === 'done') { var invert = _.invert(ref); diff --git a/hourglass/client/profile/profile.js b/hourglass/client/profile/profile.js index 0b4e95a..7a9c650 100644 --- a/hourglass/client/profile/profile.js +++ b/hourglass/client/profile/profile.js @@ -68,7 +68,7 @@ Template.profile.helpers({ banner() { // Styles the banner var width = window.innerWidth * 1600 / 1920; var height = width * 615 / 1600; - if (Meteor.user().profile.banner !== undefined) { + if (Meteor.user().profile.banner !== undefined || Meteor.user().profile.banner !== null) { var banner = Meteor.user().profile.banner; } else { var banner = "Banners/defaultcover.jpg"; @@ -147,8 +147,7 @@ Template.profile.helpers({ classHolderHeight() { // Dimensions the container for the classes return 0.26 * window.innerHeight.toString() + "px"; }, - profClassTabColor(status) { // Change this [Supposed to show the current mode that's selected via color] -       + profClassTabColor(status) { // Change this [Supposed to show the current mode that's selected via color]     if (Session.equals("profClassTab",status)) {             return themeColors[Meteor.user().profile.preferences.theme].highlightText;         } else {             @@ -156,7 +155,7 @@ Template.profile.helpers({ }     }, profClassTab(tab) { // Tells current class - if (Session.get("profClassTab",tab)) { + if (Session.equals("profClassTab",tab)) { return true; } else { return false; diff --git a/hourglass/server/main.js b/hourglass/server/main.js index e139fb5..f1a80c6 100644 --- a/hourglass/server/main.js +++ b/hourglass/server/main.js @@ -37,7 +37,7 @@ Meteor.publish('schools', function() { Meteor.publish('classes', function() { if (Roles.userIsInRole(this.userId, ['superadmin', 'admin'])) { return classes.find(); - } else { + } else if(this.userId !== null) { // Return user classes and all _public_ classes. var userprofile = Meteor.users.findOne(this.userId); if (userprofile !== undefined && userprofile.profile.classes !== undefined) { @@ -79,7 +79,7 @@ Meteor.publish('classes', function() { Meteor.publish('work', function() { if (Roles.userIsInRole(this.userId, ['superadmin', 'admin'])) { return work.find(); - } else { + } else if(this.userId !== null) { var userprofile = Meteor.users.findOne(this.userId); if (userprofile !== undefined && userprofile.profile.classes !== undefined) { return work.find({