a null token has no scopes

This commit is contained in:
2025-01-26 12:51:37 +00:00
parent bb1c1944ca
commit 9c1eaf3ff7
+3
View File
@@ -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