Skip to content

Commit e22e636

Browse files
committed
fix: fixed code
1 parent 840d0a3 commit e22e636

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,7 @@ export class App<
205205
}),
206206
}
207207
}).filter((m) => {
208-
const res = m.pattern.test(url)
209-
return res
208+
return m.pattern.test(url)
210209
})
211210
return result
212211
}
@@ -310,7 +309,7 @@ export class App<
310309
* @param Server callback after server starts listening
311310
* @param host server listening host
312311
*/
313-
async listen(port: number, cb?: (error: any) => void, hostname?: string) {
312+
async listen(port: number, cb?: () => void, hostname?: string) {
314313
const listener = Deno.listen({ hostname, port })
315314

316315
const denoListener = async () => {
@@ -324,7 +323,7 @@ export class App<
324323
}
325324
}
326325
}
327-
await denoListener.bind(this)().catch(error => cb!(error))
326+
await denoListener.bind(this)()
328327
return listener
329328
}
330329
}

0 commit comments

Comments
 (0)