style(xrpc-server): avoid un-neccessary "if" statement ()

fix(xrpc-server): avoid un-neccessary "if" statement
This commit is contained in:
Matthieu Sieben 2023-12-01 00:53:23 +01:00 committed by GitHub
parent 2fc6ca54c1
commit 2513bd1b26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -248,11 +248,9 @@ export class Server {
}
// handle rate limits
if (consumeRateLimit) {
const result = await consumeRateLimit(reqCtx)
if (result instanceof RateLimitExceededError) {
return next(result)
}
const result = await consumeRateLimit(reqCtx)
if (result instanceof RateLimitExceededError) {
return next(result)
}
// run the handler