KrisVos130 9 years ago
parent
commit
8319da5e7d
2 changed files with 3 additions and 4 deletions
  1. 2 3
      app/client/client.js
  2. 1 1
      app/client/templates/profile.html

+ 2 - 3
app/client/client.js

@@ -139,9 +139,8 @@ Template.profile.helpers({
         return dislikedArr;
     },
     initials: function() {
-        var user = Meteor.user();
-        if (user !== undefined) {
-            return user.profile.username[0].toUpperCase();
+        if (Session.get("username") !== undefined) {
+            return Session.get("username")[0].toUpperCase();
         } else {
             return "";
         }

+ 1 - 1
app/client/templates/profile.html

@@ -4,7 +4,7 @@
       {{> header}}
       <div class="row">
         {{#if loaded}}
-            {{> avatar userId=userId shape="circle" class="profile-img" initials=initials}}
+            {{> avatar userId=profileUserId shape="circle" class="profile-img" initials=initials}}
             <h1 id="profile-name">{{username}}</h1>
 
             <div class="col-md-4">