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)
|
send("#{mn}=", value)
|
||||||
end
|
end
|
||||||
if current = send(mn.pluralize)
|
if current = send(mn.pluralize)
|
||||||
current << value
|
current << value if current.respond_to? :<<
|
||||||
else
|
else
|
||||||
send("#{mn.pluralize}=", [value])
|
send("#{mn.pluralize}=", [value])
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue