meteor-event-horizon
meteor-event-horizon copied to clipboard
LoggedOut event does not fire
It works on the loggedIn event.
EventHorizon.fireWhenTrue('loggedIn',function(){
return Meteor.userId() !== null;
});
EventHorizon.on('loggedIn',function(){
console.log('The user just logged in.');
});
But when I changed it to
EventHorizon.fireWhenTrue('loggedOut',function(){
return Meteor.userId() === null;
});
EventHorizon.on('loggedOut',function(){
console.log('The user just logged out.');
});
it fails to fire the event (login and logout multiple times). BTW, it is easy to check that
Meteor.userId() === null
in the console.