digitalnatives/fron

DOM::Element.find should return Opal.nil if there is no element

gdotdesign opened this issue · 1 comments

https://github.com/digitalnatives/fron/blob/master/opal/fron/dom/element.rb#L103

Can be written as:

def find(selector)
  `#{@el}.querySelector(#{selector}) || Opal.nil`
end

Fixed in 082bc58