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 @@ -34,24 +34,23 @@ var ReactFragment = {
34
34
// Wrap a keyed object in an opaque proxy that warns you if you access any
35
35
// of its properties.
36
36
create : function ( object ) {
37
- if ( __DEV__ ) {
38
- if ( typeof object !== 'object' || ! object || Array . isArray ( object ) ) {
39
- warning (
40
- false ,
41
- 'React.addons.createFragment only accepts a single object. Got: %s' ,
42
- object
43
- ) ;
44
- return object ;
45
- }
46
- if ( ReactElement . isValidElement ( object ) ) {
47
- warning (
48
- false ,
49
- 'React.addons.createFragment does not accept a ReactElement ' +
50
- 'without a wrapper object.'
51
- ) ;
52
- return object ;
53
- }
37
+ if ( typeof object !== 'object' || ! object || Array . isArray ( object ) ) {
38
+ warning (
39
+ false ,
40
+ 'React.addons.createFragment only accepts a single object. Got: %s' ,
41
+ object
42
+ ) ;
43
+ return object ;
54
44
}
45
+ if ( ReactElement . isValidElement ( object ) ) {
46
+ warning (
47
+ false ,
48
+ 'React.addons.createFragment does not accept a ReactElement ' +
49
+ 'without a wrapper object.'
50
+ ) ;
51
+ return object ;
52
+ }
53
+
55
54
invariant (
56
55
object . nodeType !== 1 ,
57
56
'React.addons.createFragment(...): Encountered an invalid child; DOM ' +
You can’t perform that action at this time.
0 commit comments