fix: empty middleware would hang

This commit is contained in:
cha0s 2021-01-14 22:28:32 -06:00
parent 1126c5751a
commit d6740c4757

View File

@ -109,6 +109,7 @@ export default class Latus {
invokeMiddleware(hook, ...args) {
debug('invokeMiddleware(...): %s', hook);
if (!this.hooks[hook]) {
args.pop()();
return Promise.resolve();
}
const parts = hook.split('/');