File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
packages/core/src/configuration Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -471,8 +471,8 @@ export class Configuration {
471471 const plugin : IEventPlugin = pluginAction
472472 ? { name : pluginOrName as string , priority, run : pluginAction }
473473 : pluginOrName as IEventPlugin ;
474- if ( ! plugin || ! plugin . run ) {
475- this . services . log . error ( "Add plugin failed: Run method not defined" ) ;
474+ if ( ! plugin || ! ( plugin . startup || plugin . run ) ) {
475+ this . services . log . error ( "Add plugin failed: startup or run method not defined" ) ;
476476 return ;
477477 }
478478
@@ -509,9 +509,7 @@ export class Configuration {
509509 * @param name
510510 */
511511 public removePlugin ( pluginOrName : IEventPlugin | string ) : void {
512- const name : string = typeof pluginOrName === "string"
513- ? pluginOrName
514- : pluginOrName . name ;
512+ const name : string = typeof pluginOrName === "string" ? pluginOrName : pluginOrName . name ;
515513 if ( ! name ) {
516514 this . services . log . error ( "Remove plugin failed: Plugin name not defined" ) ;
517515 return ;
You can’t perform that action at this time.
0 commit comments