Avoid .bind with .loadOnClusterRenderer

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
Panu Horsmalahti committed 2022-01-18 21:02:38 +02:00
1 parent 95a5307fcd
commit 09a4da6b28
2 files changed
+2 -4

No files matched your search

@@ -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));
@@ -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,