diff --git a/client/src/app/core/plugins/hooks.service.ts b/client/src/app/core/plugins/hooks.service.ts index d9fef8389..978316ec2 100644 --- a/client/src/app/core/plugins/hooks.service.ts +++ b/client/src/app/core/plugins/hooks.service.ts @@ -48,6 +48,15 @@ export class HooksService { return this.pluginService.runHook(hookResultName, result, params) } + async wrapFunResult
+ (fun: RawFunction
, params: P, scope: PluginClientScope, hookResultName: H) {
+ await this.pluginService.ensurePluginsAreLoaded(scope)
+
+ const result = fun(params)
+
+ return this.pluginService.runHook(hookResultName, result, params)
+ }
+
runAction