Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2021-10-05 14:46:18 -04:00
1 parent 87babc8f2c
commit fe212ad313
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -230,7 +230,7 @@ export abstract class CatalogEntity<
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 onSettingsOpen(context: CatalogEntitySettingsContext): void | Promise<void>;
}
+1 -1
View File
@@ -237,7 +237,7 @@ export class CatalogEntityRegistry {
this.onBeforeRun(entity)
.then(doOnRun => {
if (doOnRun) {
return entity.onRun(catalogEntityRunContext);
return entity.onRun?.(catalogEntityRunContext);
} else {
logger.debug(`onBeforeRun for ${entity.getId()} returned false`);
}