FIX: do not raise error if 'class' attribute is not found.

This commit is contained in:
Vinoth Kannan 2020-05-01 10:03:40 +05:30
parent 4afbcb9872
commit 5ff24b6891
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ class ExcerptParser < Nokogiri::XML::SAX::Document
when "aside"
attributes = Hash[*attributes.flatten]
unless (@keep_onebox_source || @keep_onebox_body) && attributes['class'].include?('onebox')
unless (@keep_onebox_source || @keep_onebox_body) && attributes['class']&.include?('onebox')
@in_quote = true
end