diff --git a/hourglass/client/main/main.html b/hourglass/client/main/main.html
index 704e30a..6585912 100644
--- a/hourglass/client/main/main.html
+++ b/hourglass/client/main/main.html
@@ -32,10 +32,13 @@
-
Enrolled
{{calCreWork}}
- {{#each myClasses}}
- {{> sidebarClasses}}
- {{/each}}
+ {{#if myClasses}}
+
+ Enrolled
{{calCreWork}}
+ {{#each myClasses}}
+ {{> sidebarClasses}}
+ {{/each}}
+ {{/if}}
@@ -152,4 +155,4 @@
{{dueDate}}
-
\ No newline at end of file
+
diff --git a/hourglass/server/main.js b/hourglass/server/main.js
index cacb98d..49ce6eb 100644
--- a/hourglass/server/main.js
+++ b/hourglass/server/main.js
@@ -449,11 +449,12 @@ Meteor.methods({
found !== null &&
pass === found.code &&
prof.classes.indexOf(change) === -1) {
+ foundsubs = found.subscribers + '';
classes.update({
_id: found._id
}, {
$set: {
- subscribers: found.subscribers.concat(Meteor.userId())
+ subscribers: foundsubs.concat(Meteor.userId())
}
});
var current = Meteor.user().profile;