We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6bd9119 + cc6074f commit 556ad27Copy full SHA for 556ad27
src/Infrastructure/BotSharp.Core/Routing/RoutingContext.cs
@@ -42,11 +42,10 @@ public string OriginAgentId
42
_routerAgentIds = agentService.GetAgents(new AgentFilter
43
{
44
Type = AgentType.Routing
45
- }).Result.Items
46
- .Select(x => x.Id).ToArray();
+ }).Result.Items.Select(x => x.Id).ToArray();
47
}
48
49
- return _stack.Where(x => !_routerAgentIds.Contains(x)).Last();
+ return _stack.Where(x => !_routerAgentIds.Contains(x)).LastOrDefault() ?? string.Empty;
50
51
52
0 commit comments