diff --git a/src/Ramstack.HtmxToolkit/HtmxRequestHeaders.cs b/src/Ramstack.HtmxToolkit/HtmxRequestHeaders.cs index 417a93d..16c098d 100644 --- a/src/Ramstack.HtmxToolkit/HtmxRequestHeaders.cs +++ b/src/Ramstack.HtmxToolkit/HtmxRequestHeaders.cs @@ -158,7 +158,7 @@ static HtmxRequestType GetRequestType(IHeaderDictionary dictionary) /// if the header value is "true"; otherwise, . /// private static bool GetBoolean(IHeaderDictionary dictionary, string key) => - dictionary.TryGetValue(key, out var value) && value[0] == "true"; + dictionary.TryGetValue(key, out var value) && value is ["true"]; /// /// Gets the value of the specified header.