From 129aaa1aa81b260d92d1885e302687a04a0990e3 Mon Sep 17 00:00:00 2001 From: arvindd <1006084+arvindd@users.noreply.github.com> Date: Mon, 6 Nov 2023 07:26:48 +0530 Subject: [PATCH] Bug fix: Location null-check in message text. --- FSharp.Examples.Polling/Services/Internal/UpdateHandlerFuncs.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FSharp.Examples.Polling/Services/Internal/UpdateHandlerFuncs.fs b/FSharp.Examples.Polling/Services/Internal/UpdateHandlerFuncs.fs index 7395dd0..6a06a73 100644 --- a/FSharp.Examples.Polling/Services/Internal/UpdateHandlerFuncs.fs +++ b/FSharp.Examples.Polling/Services/Internal/UpdateHandlerFuncs.fs @@ -154,7 +154,7 @@ module UpdateHandlerFuncs = logInfo logger $"Receive message type: {message.Type}" match message.Text with - | text when message.Text <> "" -> + | text when (not (String.IsNullOrEmpty message.Text)) -> // We use tryHead here just in case we get an empty // response from the user match text.Split(' ') |> Array.tryHead with