We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7319c2f commit a4406e1Copy full SHA for a4406e1
lib/indieweb/endpoints/response_headers_parser.rb
@@ -11,12 +11,12 @@ def initialize(response)
11
end
12
13
# @param identifier [Symbol]
14
- # @return [Array<String>, nil]
+ # @return [Array<String>]
15
def results_for(identifier)
16
# Reject endpoints that contain a fragment identifier
17
- parsed_headers[identifier]&.filter_map do |header|
18
- header.target_uri unless HTTP::URI.parse(header.target_uri).fragment
19
- end
+ Array(parsed_headers[identifier])
+ .filter { |header| !HTTP::URI.parse(header.target_uri).fragment }
+ .map(&:target_uri)
20
21
22
private
0 commit comments