From 5ed3f04d48e5a54ac0f7d0461e90ac3fe5a40632 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Thu, 3 Oct 2024 10:30:22 +0200 Subject: [PATCH] refactor: :rotating_light: Simplify boolean return --- utils/oauth.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/utils/oauth.ts b/utils/oauth.ts index 8d8b5a13..21c44bb1 100644 --- a/utils/oauth.ts +++ b/utils/oauth.ts @@ -49,13 +49,7 @@ export const checkIfOauthIsValid = ( } // If there are scopes left, check if they match - if ( - nonMatchedScopes.every((scope) => - application.scopes.split(" ").includes(scope), - ) - ) { - return true; - } - - return false; + return nonMatchedScopes.every((scope) => + application.scopes.split(" ").includes(scope), + ); };