Skip to content

return undefined instead of an emtpy object - #1

Open
51smith wants to merge 1 commit into
developmentfrom
51smith-patch-1
Open

return undefined instead of an emtpy object#1
51smith wants to merge 1 commit into
developmentfrom
51smith-patch-1

Conversation

@51smith

@51smith 51smith commented Jul 22, 2016

Copy link
Copy Markdown
Owner
  • 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