a null token has no scopes
This commit is contained in:
@@ -13,6 +13,9 @@ function getTwurpleProxy(token){
|
||||
* @param {...string} scopes
|
||||
*/
|
||||
function hasScopes(token,...scopes){
|
||||
if(!token){
|
||||
return false
|
||||
}
|
||||
for(const scope of scopes){
|
||||
if(!token.scope.includes(scope)){
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user