Skip to content

Commit f0956be

Browse files
committed
Improve last commit
1 parent c94f8cb commit f0956be

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/xml_security.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ class Document < BaseDocument
8181
attr_accessor :uuid
8282

8383
def uuid
84-
uuid ||= document.root.attributes['ID']
84+
@uuid ||= begin
85+
document.root.nil? ? nil : document.root.attributes['ID']
86+
end
8587
end
8688

8789
#<Signature>

0 commit comments

Comments
 (0)