Skip to content

Commit

Permalink
Flush when testing login
Browse files Browse the repository at this point in the history
  • Loading branch information
zquestz committed Jul 29, 2012
1 parent 5860523 commit 8dab7ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions simplechat.js
Expand Up @@ -109,6 +109,8 @@ if (Meteor.is_client) {
username = registerbox.val(),
now = (new Date()).getTime();

Meteor.flush();

if (Template.register.warning() === "") {
var user_id = Users.insert({name: username, last_seen: now});
Session.set("user_id", user_id);
Expand Down

0 comments on commit 8dab7ee

Please sign in to comment.