Skip to content

Commit 2acb085

Browse files
committed
add includes? check when reading attribute.first
1 parent 55d5560 commit 2acb085

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/onelogin/ruby-saml/attributes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def include?(name)
4747

4848
# Return first value for an attribute
4949
def single(name)
50-
attributes[canonize_name(name)].first if attributes[canonize_name(name)]
50+
attributes[canonize_name(name)].first if self.include?(name)
5151
end
5252

5353
# Return all values for an attribute

0 commit comments

Comments
 (0)