Skip to content

Commit cd96fbc

Browse files
committed
chore: remove ??= operator in favor of explicit if
1 parent 52d5aae commit cd96fbc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/grants/refresh_token.grant.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ export class RefreshTokenGrant extends AbstractGrant {
8585
throw OAuthException.invalidParameter("refresh_token", "Token has expired");
8686
}
8787

88-
refreshToken ??= await this.tokenRepository.getByRefreshToken(refreshTokenData.refresh_token_id);
88+
if (!refreshToken) {
89+
refreshToken = await this.tokenRepository.getByRefreshToken(refreshTokenData.refresh_token_id);
90+
}
8991

9092
if (await this.tokenRepository.isRefreshTokenRevoked(refreshToken)) {
9193
throw OAuthException.invalidParameter("refresh_token", "Token has been revoked");

0 commit comments

Comments
 (0)