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

return undefined instead of an emtpy object #1

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

51smith
Copy link
Owner

@51smith 51smith commented Jul 22, 2016

  • Description explains the issue / use-case resolved
  • Only contains code directly related to the issue
  • Has tests.
  • Has docs.
  • Passes all tests
  • Has been linted and follows the style guide

Hi Aaron

As requested, a PR on the development branch.

Kind regards,
Shane

Meteor login handler runner expects either and object with an user id, or an error, otherwise you are not supposed to return anything, or undefined, so it can continue with other login handlers.
Currently we are returning an empty object, when we are sure the login attempt is not meant for this handler. The empty object however will actually cause an exception and stop the handler from running more login attempts later in the chain and throw an error instead.

Account_server.js:318

throw new Error("A login method must specify a userId or an error");

Meteor login handler runner expects either and object with an user id, or an error, otherwise you are not supposed to return anything, or undefined, so it can continue with other login handlers.
Currently we are returning an empty object, when we are sure the login attempt is not meant for this handler. The empty object however will actually cause an exception and stop the handler from running more login attempts later in the chain and throw an error instead.

Account_server.js:318

throw new Error("A login method must specify a userId or an error");
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

Successfully merging this pull request may close these issues.

1 participant