Handle the default case of parameters

This commit is contained in:
Thorsten Sommer 2024-10-27 14:02:05 +01:00
parent c78f73f4e2
commit 9fe6ef9f58
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -245,7 +245,7 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
protected Task SendToAssistant(Tools.Components destination, SendToButton sendToButton) protected Task SendToAssistant(Tools.Components destination, SendToButton sendToButton)
{ {
var contentToSend = sendToButton.UseResultingContentBlockData switch var contentToSend = sendToButton == default ? string.Empty : sendToButton.UseResultingContentBlockData switch
{ {
false => sendToButton.GetText(), false => sendToButton.GetText(),
true => this.resultingContentBlock?.Content switch true => this.resultingContentBlock?.Content switch