Skip to content

Commit

Permalink
Merge pull request #117 from feathersjs/allow-user-id-of-0
Browse files Browse the repository at this point in the history
Allow user.id to be 0.  Fixes #116
  • Loading branch information
ekryski authored and daffl committed Aug 29, 2018
1 parent f7ca483 commit af2a178
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/authentication/src/services/token/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class Service {
const options = this.options;

const data = {
id: user[options.idField] || user.id
id: user.hasOwnProperty(options.idField) ? user[options.idField] : user.id
};

if (Array.isArray(options.extraFields)) {
Expand Down

0 comments on commit af2a178

Please # to comment.