Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Move warning out of session

  • Loading branch information...
commit fb35ed769f7b4dea3c14a2a5de4e89ae0abc08a0 1 parent 06323d1
Josh Ellithorpe authored

Showing 1 changed file with 2 additions and 5 deletions. Show diff stats Hide diff stats

  1. +2 5 simplechat.js
7 simplechat.js
@@ -72,9 +72,7 @@ if (Meteor.is_client) {
72 72 return ((user_id && secret) ? true : false);
73 73 };
74 74
75   - Template.register.warning = function () {
76   - var warning = Session.get('warning');
77   -
  75 + Template.register.warning = function (warning) {
78 76 $('#warning').text(warning);
79 77 };
80 78
@@ -89,8 +87,7 @@ if (Meteor.is_client) {
89 87 alert(error);
90 88 } else {
91 89 if (result.warning) {
92   - Session.set("warning", result.warning);
93   - Template.register.warning();
  90 + Template.register.warning(result.warning);
94 91 } else {
95 92 Session.set("user_id", result.user_id);
96 93 Session.set("secret", result.secret);

0 comments on commit fb35ed7

Please sign in to comment.
Something went wrong with that request. Please try again.