From 1378c0d343028f3d40d7d795422684ab9e6a1599 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Aug 2021 11:27:47 +0200 Subject: Fix client lint --- client/src/root-helpers/plugins-manager.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'client/src/root-helpers') 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 @@ import * as debug from 'debug' -import { ReplaySubject } from 'rxjs' +import { firstValueFrom, ReplaySubject } from 'rxjs' import { first, shareReplay } from 'rxjs/operators' import { RegisterClientHelpers } from 'src/types/register-client-option.model' import { getHookType, internalRunHook } from '@shared/core-utils/plugins/hooks' @@ -102,9 +102,10 @@ class PluginsManager { ensurePluginsAreLoaded (scope: PluginClientScope) { this.loadPluginsByScope(scope) - return this.pluginsLoaded[scope].asObservable() + const obs = this.pluginsLoaded[scope].asObservable() .pipe(first(), shareReplay()) - .toPromise() + + return firstValueFrom(obs) } async reloadLoadedScopes () { -- cgit v1.2.3