File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -40,14 +40,10 @@ if (STANDBY_MODE) {
4040 if ( input . enableActorAutoLoading ) {
4141 tools . push ( addTool , removeTool ) ;
4242 }
43- if ( input . actors === undefined || input . actors === null ) {
44- const actorTools = await getActorsAsTools ( defaults . actors , process . env . APIFY_TOKEN as string ) ;
45- tools . push ( ...actorTools ) ;
46- } else {
47- const actorsToLoad = Array . isArray ( input . actors ) ? input . actors : input . actors . split ( ',' ) ;
48- const actorTools = await getActorsAsTools ( actorsToLoad , process . env . APIFY_TOKEN as string ) ;
49- tools . push ( ...actorTools ) ;
50- }
43+ const actors = input . actors ?? defaults . actors ;
44+ const actorsToLoad = Array . isArray ( actors ) ? actors : actors . split ( ',' ) ;
45+ const actorTools = await getActorsAsTools ( actorsToLoad , process . env . APIFY_TOKEN as string ) ;
46+ tools . push ( ...actorTools ) ;
5147 mcpServer . updateTools ( tools ) ;
5248 app . listen ( PORT , ( ) => {
5349 log . info ( `The Actor web server is listening for user requests at ${ HOST } ` ) ;
You can’t perform that action at this time.
0 commit comments