style(xrpc-server): avoid un-neccessary "if" statement (#1826)
fix(xrpc-server): avoid un-neccessary "if" statement
This commit is contained in:
parent
2fc6ca54c1
commit
2513bd1b26
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user