Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit f499390

Browse files
committed
Fix React::Test::Utils.render_into_document
In react v13, an internal dom component instance is returned instead of an actual dom node
1 parent a4bdc9c commit f499390

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/react/test/utils.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ def self.render_into_document(element, options = {})
99

1010
if `#{native_instance}._getOpalInstance !== undefined`
1111
`#{native_instance}._getOpalInstance()`
12+
elsif `ReactTestUtils.isDOMComponent(#{native_instance}) && React.findDOMNode !== undefined`
13+
`React.findDOMNode(#{native_instance})`
1214
else
1315
native_instance
1416
end

0 commit comments

Comments
 (0)