diff options
Diffstat (limited to 'client/src/app/core/plugins/hooks.service.ts')
-rw-r--r-- | client/src/app/core/plugins/hooks.service.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/app/core/plugins/hooks.service.ts b/client/src/app/core/plugins/hooks.service.ts index 80c57869c..257e27e6b 100644 --- a/client/src/app/core/plugins/hooks.service.ts +++ b/client/src/app/core/plugins/hooks.service.ts | |||
@@ -37,8 +37,9 @@ export class HooksService { | |||
37 | return this.pluginService.runHook(hookName, result, params) | 37 | return this.pluginService.runHook(hookName, result, params) |
38 | } | 38 | } |
39 | 39 | ||
40 | runAction<T, U extends ClientActionHookName> (hookName: U, params?: T) { | 40 | runAction<T, U extends ClientActionHookName> (hookName: U, scope: PluginClientScope, params?: T) { |
41 | this.pluginService.runHook(hookName, params) | 41 | this.pluginService.ensurePluginsAreLoaded(scope) |
42 | .catch((err: any) => console.error('Fatal hook error.', { err })) | 42 | .then(() => this.pluginService.runHook(hookName, params)) |
43 | .catch((err: any) => console.error('Fatal hook error.', { err })) | ||
43 | } | 44 | } |
44 | } | 45 | } |