lib/react/top_level_render.rb in hyper-component-0.99.1 vs lib/react/top_level_render.rb in hyper-component-0.99.2

- old
+ new

@@ -14,10 +14,12 @@ } native = `ReactDOM.render(#{element.to_n}, container, cb)` else native = `ReactDOM.render(#{element.to_n}, container)` end - + + return unless `#{native} !== null` + if `#{native}.__opalInstance !== undefined && #{native}.__opalInstance !== null` `#{native}.__opalInstance` elsif `ReactDOM.findDOMNode !== undefined && #{native}.nodeType === undefined` `ReactDOM.findDOMNode(#{native})` else