Skip to content

Commit

Permalink
prefer #fetch so we know if we try to query on a nonexistant key
Browse files Browse the repository at this point in the history
  • Loading branch information
xunker committed Sep 17, 2024
1 parent b69d70d commit b6ebaea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/linear/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def match_score?(string)

# Does :string _exactly_ match any of the attribute values in *attrs?
def matches_attributes?(string, *attrs)
Array(attrs).any? { |attr| string.casecmp?(data[attr.to_sym]) }
Array(attrs).any? { |attr| string.casecmp?(data.fetch(attr.to_sym)) }
end

def to_s
Expand Down

0 comments on commit b6ebaea

Please sign in to comment.