Skip to content

Commit

Permalink
fix: #9378, crash on verifyToken if API Token settings not saved (nul…
Browse files Browse the repository at this point in the history
…l case error)
  • Loading branch information
julianlam committed Mar 14, 2021
1 parent 27facad commit cc48970
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Auth.getLoginStrategies = function () {
};

Auth.verifyToken = async function (token, done) {
let { tokens } = await meta.settings.get('core.api');
let { tokens = [] } = await meta.settings.get('core.api');
tokens = tokens.reduce((memo, cur) => {
memo[cur.token] = cur.uid;
return memo;
Expand Down

0 comments on commit cc48970

Please sign in to comment.