1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Avoid .bind with .loadOnClusterRenderer

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
Panu Horsmalahti 2022-01-18 17:44:03 +02:00
parent 95a5307fcd
commit 09a4da6b28
2 changed files with 2 additions and 4 deletions

View File

@ -364,7 +364,7 @@ export class ExtensionLoader {
});
}
protected autoInitExtensions(register: (ext: LensExtension) => Promise<Disposer[]>) {
protected autoInitExtensions = (register: (ext: LensExtension) => Promise<Disposer[]>) => {
// Setup reaction to load extensions on JSON changes
reaction(() => this.toJSON(), installedExtensions => this.loadExtensions(installedExtensions, register));

View File

@ -13,11 +13,9 @@ import clusterFrameContextInjectable from "../../../cluster-frame-context/cluste
const initClusterFrameInjectable = getInjectable({
instantiate: (di) => {
const extensionLoader = di.inject(extensionLoaderInjectable);
return initClusterFrame({
hostedCluster: di.inject(hostedClusterInjectable),
loadExtensions: extensionLoader.loadOnClusterRenderer.bind(extensionLoader),
loadExtensions: di.inject(extensionLoaderInjectable).loadOnClusterRenderer,
catalogEntityRegistry: di.inject(catalogEntityRegistryInjectable),
frameRoutingId: di.inject(frameRoutingIdInjectable),
emitEvent: di.inject(appEventBusInjectable).emit,