versolearning / meteor-intercom

Reactive intercom integration for Meteor
47 stars 15 forks source link

Secure mode error #6

Closed isAlmogK closed 8 years ago

isAlmogK commented 10 years ago

I'm running into the same issue as https://github.com/percolatestudio/meteor-intercom/issues/3

But I am waiting for the user hash to be ready

I'm running into the same issue only happens on page refresh I'm making sure I have the users intercom hash but still getting this error here is my code any ideas

//Intercom sending data IntercomSettings.userInfo = function(user, info) { // add properties to the info object, for instance: if (user.intercomHash) info.email = user.email; info.name = user.profile.name; };

tmeasday commented 10 years ago

That code looks wrong (where are the braces after the if?) Perhaps you should format your code with backticks?

isAlmogK commented 10 years ago

I have this

//Intercom sending data
IntercomSettings.userInfo = function(user, info) {
// add properties to the info object, for instance:
  if (user.intercomHash) {
       info.email = user.email;
       info.name = user.profile.name;
 }
};