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:
parent
a00edda73d
commit
a54c64034d
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue