fix: empty middleware would hang
This commit is contained in:
parent
1126c5751a
commit
d6740c4757
|
@ -109,6 +109,7 @@ export default class Latus {
|
||||||
invokeMiddleware(hook, ...args) {
|
invokeMiddleware(hook, ...args) {
|
||||||
debug('invokeMiddleware(...): %s', hook);
|
debug('invokeMiddleware(...): %s', hook);
|
||||||
if (!this.hooks[hook]) {
|
if (!this.hooks[hook]) {
|
||||||
|
args.pop()();
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
const parts = hook.split('/');
|
const parts = hook.split('/');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user