maintain old behaviour

This commit is contained in:
Barış Soner Uşaklı
2024-02-26 13:19:16 -05:00
parent 96fc20a31c
commit 992a9d72c3

View File

@@ -230,8 +230,11 @@ function hookHandlerPromise(hook, hookObj, params) {
return;
}
if (hook.startsWith('filter:') && returned) {
if (hook.startsWith('filter:') && returned !== undefined) {
_resolve(returned);
} else if (hook.startsWith('static:') && hookObj.method.length <= 1) {
// make sure it is resolved if static hook doesn't return anything and doesn't use callback
_resolve();
}
});
}