Skip to content
This repository was archived by the owner on Feb 25, 2019. It is now read-only.

authorizedScope, allow for no role scopes #328

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions models/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,11 @@ Client.prototype.authorizedScope = function (callback) {

multi.exec(function (err, results) {
if (err) { return callback(err) }

if (!results || results.length === 0) {
return callback(null, [])
}

callback(null, results.map(function (result) {
return result[1][0]
}))
Expand Down