Skip to content

Commit 4d4dcdb

Browse files
committed
style(handler): enforce braces for control statements 🎨
- Add curly braces to single-line if statement in middleware execution logic
1 parent 1c80c4e commit 4d4dcdb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Handler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@ export class Handler {
254254
*/
255255
private async executeMiddlewares(ctx: Context, pathname: string): Promise<Response | undefined> {
256256
const applicableMiddlewares = this.entryMiddleware.filter(mw => {
257-
if (mw.path === '' || mw.path === '*') return true
257+
if (mw.path === '' || mw.path === '*') {
258+
return true
259+
}
258260
if (mw.path.endsWith('/**')) {
259261
const base = mw.path.slice(0, -3)
260262
return pathname.startsWith(base)

0 commit comments

Comments
 (0)