From abc37e3d857b7e2b40fc9cc69d1a6e618b8d3a51 Mon Sep 17 00:00:00 2001 From: Richard Szalay Date: Thu, 12 Oct 2023 21:03:05 +1100 Subject: [PATCH] Fix nullable warning --- .../Formatters/RequestHandlerResultFormatter.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RichardSzalay.MockHttp/Formatters/RequestHandlerResultFormatter.cs b/RichardSzalay.MockHttp/Formatters/RequestHandlerResultFormatter.cs index 815d519..69dd64f 100644 --- a/RichardSzalay.MockHttp/Formatters/RequestHandlerResultFormatter.cs +++ b/RichardSzalay.MockHttp/Formatters/RequestHandlerResultFormatter.cs @@ -99,7 +99,10 @@ string GetMatcherStatus(IMockedRequestMatcher matcher) if (result.Handler is not IEnumerable matchers) { - sb.AppendLine(result.Handler.ToString()); + if (result.Handler is not null) + { + sb.AppendLine(result.Handler.ToString()); + } return; }