Don't crash if it's not possible to attach to property

Normally one can attach to properties, but if it is of a type URL then
it crashes hard. This check just drops everything which can't be
attached by `<<`.
This commit is contained in:
Jeena 2016-04-24 01:28:27 +02:00
parent a00edda73d
commit a54c64034d

View file

@ -102,7 +102,7 @@ module Microformats2
send("#{mn}=", value)
end
if current = send(mn.pluralize)
current << value
current << value if current.respond_to? :<<
else
send("#{mn.pluralize}=", [value])
end