Verified Commit 3a380e9a authored by Chocobozzz's avatar Chocobozzz
Browse files

Merge branch 'release/5.0.0' into develop

parents 389eb034 2e5dd0be
......@@ -108,11 +108,16 @@ class PluginsManager {
}
}
async runHook<T> (hookName: ClientHookName, result?: T, params?: any) {
if (!this.hooks[hookName]) return result
async runHook<T> (hookName: ClientHookName, resultArg?: T | Promise<T>, params?: any) {
if (!this.hooks[hookName]) {
// eslint-disable-next-line no-return-await
return await resultArg
}
const hookType = getHookType(hookName)
let result = await resultArg
for (const hook of this.hooks[hookName]) {
logger.info(`Running hook ${hookName} of plugin ${hook.plugin.name}`)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment