aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/root-helpers/plugins-manager.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-17 11:27:47 +0200
committerChocobozzz <me@florianbigard.com>2021-08-17 14:01:45 +0200
commit1378c0d343028f3d40d7d795422684ab9e6a1599 (patch)
tree08062b84a38a7e2dfe0aa674e7ca8e1b7321044e /client/src/root-helpers/plugins-manager.ts
parentc186a67f90203af6bfa434f026efdc99193bcd65 (diff)
downloadPeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.gz
PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.zst
PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.zip
Fix client lint
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 () {