Skip to content

Commit

Permalink
Fix ts error
Browse files Browse the repository at this point in the history
  • Loading branch information
parzival418 committed Nov 22, 2024
1 parent 5aab0fa commit 4f5b2c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/server/agents/src/lib/Agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ export class Agent
): boolean {
const channel = this.channels.get(channelId)
if (channel) {
super.emit(event, data) // Global emit
super.emit(event, ...([data] as Parameters<AgentEvents[K]>)) // Global emit
return channel.emit(event, data) // Channel-specific emit
}
return false
Expand All @@ -514,7 +514,7 @@ export class Agent
if (channelId) {
return this.handleChannelEvent(channelId, event, data)
}
return super.emit(event, data)
return super.emit(event, ...([data] as Parameters<AgentEvents[K]>))
}
}

Expand Down

0 comments on commit 4f5b2c2

Please sign in to comment.