aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/root-helpers/plugins-manager.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/root-helpers/plugins-manager.ts')
-rw-r--r--client/src/root-helpers/plugins-manager.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/root-helpers/plugins-manager.ts b/client/src/root-helpers/plugins-manager.ts
index f919db8af..d14ac4acd 100644
--- a/client/src/root-helpers/plugins-manager.ts
+++ b/client/src/root-helpers/plugins-manager.ts
@@ -1,5 +1,5 @@
1import * as debug from 'debug' 1import * as debug from 'debug'
2import { ReplaySubject } from 'rxjs' 2import { firstValueFrom, ReplaySubject } from 'rxjs'
3import { first, shareReplay } from 'rxjs/operators' 3import { first, shareReplay } from 'rxjs/operators'
4import { RegisterClientHelpers } from 'src/types/register-client-option.model' 4import { RegisterClientHelpers } from 'src/types/register-client-option.model'
5import { getHookType, internalRunHook } from '@shared/core-utils/plugins/hooks' 5import { getHookType, internalRunHook } from '@shared/core-utils/plugins/hooks'
@@ -102,9 +102,10 @@ class PluginsManager {
102 ensurePluginsAreLoaded (scope: PluginClientScope) { 102 ensurePluginsAreLoaded (scope: PluginClientScope) {
103 this.loadPluginsByScope(scope) 103 this.loadPluginsByScope(scope)
104 104
105 return this.pluginsLoaded[scope].asObservable() 105 const obs = this.pluginsLoaded[scope].asObservable()
106 .pipe(first(), shareReplay()) 106 .pipe(first(), shareReplay())
107 .toPromise() 107
108 return firstValueFrom(obs)
108 } 109 }
109 110
110 async reloadLoadedScopes () { 111 async reloadLoadedScopes () {