Skip to content

Commit

Permalink
Logout should always give a response. (#369)
Browse files Browse the repository at this point in the history
* Logout should always give a response.

I'm not sure what the correct way to handle this is, but this fixes feathersjs-ecosystem/authentication-client#10.

* Make sure it’s a function before trying to call it

I somehow encountered a scenario where callback didn’t exist, so this catches it.  For some reason I can’t seem to test logging out when not logged in.
  • Loading branch information
marshallswain authored and daffl committed Aug 29, 2018
1 parent c872585 commit 5ee5454
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/authentication/src/socket/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export default function setupSocketHandler(app, options, { feathersParams, provi
});

handleSocketCallback(promise, callback);
} else if (typeof callback === 'function') {
return callback(null, {});
}
};

Expand Down

0 comments on commit 5ee5454

Please sign in to comment.