Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"TypeError: t.find(...) is null" error prevents signup when using passwordSignupFields: 'USERNAME_ONLY' #93

Closed
lestephane opened this issue Feb 21, 2014 · 1 comment

Comments

@lestephane
Copy link
Contributor

When the signup form does not contain an email field, as is the case when
passwordSignupFields: 'USERNAME_ONLY', clicking on Signup causes the
signup process to fail with the following error in the console:

"TypeError: t.find(...) is null"

The offending line is the following in accounts-entry.js.

Template.entrySignUp.events({
  'submit #signUp': function(event, t) {
    var email, emailRequired, fields, password, passwordErrors, signupCode, trimInput, username, usernameRequired;
    event.preventDefault();
    username = t.find('input[name="username"]') ? t.find('input[name="username"]').value.toLowerCase() : void 0;
    signupCode = t.find('input[name="signupCode"]') ? t.find('input[name="signupCode"]').value : void 0;
    email = t.find('input[type="email"]').value; <<<<<<<<<<<<<<< HERE
    password = t.find('input[type="password"]').value;
    fields = AccountsEntry.settings.passwordSignupFields;
ryw added a commit that referenced this issue Feb 28, 2014
@ryw
Copy link
Contributor

ryw commented Feb 28, 2014

merged PR - thanks for contribution.

@ryw ryw closed this as completed Feb 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants