mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
87babc8f2c
commit
fe212ad313
@ -230,7 +230,7 @@ export abstract class CatalogEntity<
|
|||||||
return this.metadata.name;
|
return this.metadata.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract onRun(context: CatalogEntityActionContext): void | Promise<void>;
|
public abstract onRun?(context: CatalogEntityActionContext): void | Promise<void>;
|
||||||
public abstract onContextMenuOpen(context: CatalogEntityContextMenuContext): void | Promise<void>;
|
public abstract onContextMenuOpen(context: CatalogEntityContextMenuContext): void | Promise<void>;
|
||||||
public abstract onSettingsOpen(context: CatalogEntitySettingsContext): void | Promise<void>;
|
public abstract onSettingsOpen(context: CatalogEntitySettingsContext): void | Promise<void>;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -237,7 +237,7 @@ export class CatalogEntityRegistry {
|
|||||||
this.onBeforeRun(entity)
|
this.onBeforeRun(entity)
|
||||||
.then(doOnRun => {
|
.then(doOnRun => {
|
||||||
if (doOnRun) {
|
if (doOnRun) {
|
||||||
return entity.onRun(catalogEntityRunContext);
|
return entity.onRun?.(catalogEntityRunContext);
|
||||||
} else {
|
} else {
|
||||||
logger.debug(`onBeforeRun for ${entity.getId()} returned false`);
|
logger.debug(`onBeforeRun for ${entity.getId()} returned false`);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user