File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ describe('findDOMNode', function() {
4242
4343 it ( 'findDOMNode should reject unmounted objects with render func' , function ( ) {
4444 expect ( function ( ) { React . findDOMNode ( { render : function ( ) { } } ) ; } )
45- . toThrow ( 'Invariant Violation: Component contains ` render` ' +
46- 'method but is not mounted in the DOM'
45+ . toThrow ( 'Invariant Violation: Component (with keys: render) ' +
46+ 'contains `render` method but is not mounted in the DOM'
4747 ) ;
4848 } ) ;
4949
Original file line number Diff line number Diff line change 1111 */
1212
1313"use strict" ;
14-
15- var ReactComponent = require ( 'ReactComponent' ) ;
1614var ReactInstanceMap = require ( 'ReactInstanceMap' ) ;
1715var ReactMount = require ( 'ReactMount' ) ;
1816
@@ -36,8 +34,10 @@ function findDOMNode(componentOrElement) {
3634 return ReactMount . getNodeFromInstance ( componentOrElement ) ;
3735 }
3836 invariant (
39- ! ( componentOrElement . render != null && typeof ( componentOrElement . render ) === 'function' ) ,
40- 'Component contains `render` method but is not mounted in the DOM' ,
37+ componentOrElement . render == null ||
38+ typeof ( componentOrElement . render ) !== 'function' ,
39+ 'Component (with keys: %s) contains `render` method '
40+ + 'but is not mounted in the DOM' ,
4141 Object . keys ( componentOrElement )
4242 ) ;
4343 invariant (
You can’t perform that action at this time.
0 commit comments