Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move warning out of session

  • Loading branch information...
commit fb35ed769f7b4dea3c14a2a5de4e89ae0abc08a0 1 parent 06323d1
@zquestz authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 simplechat.js
View
7 simplechat.js
@@ -72,9 +72,7 @@ if (Meteor.is_client) {
return ((user_id && secret) ? true : false);
};
- Template.register.warning = function () {
- var warning = Session.get('warning');
-
+ Template.register.warning = function (warning) {
$('#warning').text(warning);
};
@@ -89,8 +87,7 @@ if (Meteor.is_client) {
alert(error);
} else {
if (result.warning) {
- Session.set("warning", result.warning);
- Template.register.warning();
+ Template.register.warning(result.warning);
} else {
Session.set("user_id", result.user_id);
Session.set("secret", result.secret);
Please sign in to comment.
Something went wrong with that request. Please try again.