diff options
Diffstat (limited to 'client/src/root-helpers/plugins-manager.ts')
-rw-r--r-- | client/src/root-helpers/plugins-manager.ts | 7 |
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 @@ | |||
1 | import * as debug from 'debug' | 1 | import * as debug from 'debug' |
2 | import { ReplaySubject } from 'rxjs' | 2 | import { firstValueFrom, ReplaySubject } from 'rxjs' |
3 | import { first, shareReplay } from 'rxjs/operators' | 3 | import { first, shareReplay } from 'rxjs/operators' |
4 | import { RegisterClientHelpers } from 'src/types/register-client-option.model' | 4 | import { RegisterClientHelpers } from 'src/types/register-client-option.model' |
5 | import { getHookType, internalRunHook } from '@shared/core-utils/plugins/hooks' | 5 | import { 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 () { |