File tree 1 file changed +16
-17
lines changed
1 file changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -46,24 +46,23 @@ var ReactFragment = {
46
46
// Wrap a keyed object in an opaque proxy that warns you if you access any
47
47
// of its properties.
48
48
create : function ( object ) {
49
- if ( __DEV__ ) {
50
- if ( typeof object !== 'object' || ! object || Array . isArray ( object ) ) {
51
- warning (
52
- false ,
53
- 'React.addons.createFragment only accepts a single object. Got: %s' ,
54
- object
55
- ) ;
56
- return object ;
57
- }
58
- if ( ReactElement . isValidElement ( object ) ) {
59
- warning (
60
- false ,
61
- 'React.addons.createFragment does not accept a ReactElement ' +
62
- 'without a wrapper object.'
63
- ) ;
64
- return object ;
65
- }
49
+ if ( typeof object !== 'object' || ! object || Array . isArray ( object ) ) {
50
+ warning (
51
+ false ,
52
+ 'React.addons.createFragment only accepts a single object. Got: %s' ,
53
+ object
54
+ ) ;
55
+ return object ;
66
56
}
57
+ if ( ReactElement . isValidElement ( object ) ) {
58
+ warning (
59
+ false ,
60
+ 'React.addons.createFragment does not accept a ReactElement ' +
61
+ 'without a wrapper object.'
62
+ ) ;
63
+ return object ;
64
+ }
65
+
67
66
invariant (
68
67
object . nodeType !== 1 ,
69
68
'React.addons.createFragment(...): Encountered an invalid child; DOM ' +
You can’t perform that action at this time.
0 commit comments