File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,10 @@ var assign = Object.assign || require('object-assign');
88var omit = require ( 'object.omit' ) ;
99
1010var PROP_TYPES = {
11- component : React . PropTypes . func . isRequired ,
11+ component : React . PropTypes . oneOfType ( [
12+ React . PropTypes . string ,
13+ React . PropTypes . func ,
14+ ] ) . isRequired ,
1215 environment : React . PropTypes . object ,
1316 gotoURL : React . PropTypes . func
1417} ;
@@ -26,7 +29,7 @@ var CaptureClicks = React.createClass({
2629
2730 getDefaultProps : function ( ) {
2831 return {
29- component : React . DOM . div ,
32+ component : ' div' ,
3033 environment : Environment . defaultEnvironment ,
3134 gotoURL : function ( url ) {
3235 // We should really just be allowing the event's default action, be we
@@ -128,7 +131,7 @@ var CaptureClicks = React.createClass({
128131 onClick : this . onClick
129132 } ) ;
130133 props = omit ( props , PROP_KEYS ) ;
131- return this . props . component ( props , this . props . children ) ;
134+ return React . createElement ( this . props . component , props , this . props . children ) ;
132135 }
133136
134137} ) ;
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ var Link = React.createClass({
8080 href : this . _createHref ( )
8181 } ) ;
8282 props = omit ( props , [ 'global' , 'globalHash' ] ) ;
83- return React . DOM . a ( props , this . props . children ) ;
83+ return React . createElement ( 'a' , props , this . props . children ) ;
8484 }
8585} ) ;
8686
You can’t perform that action at this time.
0 commit comments