This repository was archived by the owner on Oct 19, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ Whitespace conventions:
2626
2727### Fixed
2828
29+ - ` $window#on ` in ` opal-jquery ` is broken. (#166 )
2930- ` Element#render ` trigger unnecessary re-mounts when called multiple times. (#170 )
3031- Gets rid of react warnings about updating state during render (#155 )
3132- Multiple HAML classes (i.e. div.foo.bar) was not working (regression introduced in 0.8.8)
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ def self.find(selector)
110110 selector . dom_node
111111 rescue
112112 selector
113- end if selector . respond_to? : dom_node
113+ end if ` #{ selector } .$ dom_node !== undefined`
114114 `$(#{ selector } )`
115115 end
116116
@@ -126,7 +126,7 @@ def self.[](selector)
126126 klass . class_eval do
127127 render ( container , params , &block )
128128 end
129-
129+
130130 React . render ( React . create_element ( `#{ self . to_n } ._reactrb_component_class` ) , self )
131131 end
132132end if Object . const_defined? ( 'Element' )
Original file line number Diff line number Diff line change @@ -56,5 +56,11 @@ def render
5656
5757 expect ( Element [ renderToDocument ( Foo ) ] . html ) . to eq ( 'hello' )
5858 end
59+
60+ it "accepts plain js object as selector" do
61+ expect {
62+ Element [ `window` ]
63+ } . not_to raise_error
64+ end
5965end
6066end
You can’t perform that action at this time.
0 commit comments