Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Ramstack.HtmxToolkit/HtmxRequestHeaders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static HtmxRequestType GetRequestType(IHeaderDictionary dictionary)
/// <see langword="true" /> if the header value is <c>"true"</c>; otherwise, <see langword="false" />.
/// </returns>
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"];

/// <summary>
/// Gets the value of the specified header.
Expand Down
Loading