Permalink
Browse files

More error handling on signup

  • Loading branch information...
zquestz committed Jul 29, 2012
1 parent b818401 commit a716d5e011b79e5b53677aaf80b39c738a4ef7e0
Showing with 3 additions and 1 deletion.
  1. +3 −1 simplechat.js
View
@@ -77,6 +77,8 @@ if (Meteor.is_client) {
if (username === "") {
warning = 'Please enter a valid username.';
+ } else if (username === undefined) {
+ warning = 'An error occurred. Please try again.'
} else if (Users.findOne({name: username})) {
warning = 'Username is already taken. Please choose another.';
} else if (username.length > 9) {
@@ -126,7 +128,7 @@ if (Meteor.is_client) {
if (username) {
Meteor.call('keepalive', username);
}
- }, 5000);
+ }, 1000);
Meteor.startup(function () {
$('#register').focus();

0 comments on commit a716d5e

Please sign in to comment.