diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-17 11:27:47 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-17 14:01:45 +0200 |
commit | 1378c0d343028f3d40d7d795422684ab9e6a1599 (patch) | |
tree | 08062b84a38a7e2dfe0aa674e7ca8e1b7321044e /client/src/root-helpers | |
parent | c186a67f90203af6bfa434f026efdc99193bcd65 (diff) | |
download | PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.gz PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.zst PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.zip |
Fix client lint
Diffstat (limited to 'client/src/root-helpers')
-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 () { |