mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix error in legacyRegisterApi on main
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
649ca09d70
commit
4916c89efb
@ -312,12 +312,13 @@ export interface DeleteResourceDescriptor extends ResourceDescriptor {
|
||||
* @deprecated In the new extension API, don't expose `KubeApi`'s constructor
|
||||
*/
|
||||
function legacyRegisterApi(api: KubeApi<any, any>): void {
|
||||
const di = getEnvironmentSpecificLegacyGlobalDiForExtensionApi(Environments.renderer);
|
||||
|
||||
if (di) {
|
||||
try {
|
||||
const di = getEnvironmentSpecificLegacyGlobalDiForExtensionApi(Environments.renderer);
|
||||
const autoRegistrationEmitter = di.inject(autoRegistrationEmitterInjectable);
|
||||
|
||||
autoRegistrationEmitter.emit("kubeApi", api);
|
||||
} catch {
|
||||
// ignore error
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user