react 0.0.0-experimental-e5d06e34b → 0.0.0-experimental-ede917064

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /** @license React v0.0.0-experimental-e5d06e34b
1
+ /** @license React v0.0.0-experimental-ede917064
2
2
  * react-jsx-dev-runtime.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,5 +6,4 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
-
10
- 'use strict';require("react");exports.Fragment=60107;if("function"===typeof Symbol&&Symbol.for){var a=Symbol.for;exports.Fragment=a("react.fragment")}exports.jsxDEV=void 0;
9
+ 'use strict';require("object-assign");require("react");exports.Fragment=60107;if("function"===typeof Symbol&&Symbol.for){var a=Symbol.for;exports.Fragment=a("react.fragment")}exports.jsxDEV=void 0;
@@ -1,4 +1,4 @@
1
- /** @license React v0.0.0-experimental-e5d06e34b
1
+ /** @license React v0.0.0-experimental-ede917064
2
2
  * react-jsx-dev-runtime.profiling.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,5 +6,4 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
-
10
- 'use strict';require("react");exports.Fragment=60107;if("function"===typeof Symbol&&Symbol.for){var a=Symbol.for;exports.Fragment=a("react.fragment")}exports.jsxDEV=void 0;
9
+ 'use strict';require("object-assign");require("react");exports.Fragment=60107;if("function"===typeof Symbol&&Symbol.for){var a=Symbol.for;exports.Fragment=a("react.fragment")}exports.jsxDEV=void 0;
@@ -1,4 +1,4 @@
1
- /** @license React v0.0.0-experimental-e5d06e34b
1
+ /** @license React v0.0.0-experimental-ede917064
2
2
  * react-jsx-runtime.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -9,14 +9,16 @@
9
9
 
10
10
  'use strict';
11
11
 
12
-
13
-
14
12
  if (process.env.NODE_ENV !== "production") {
15
13
  (function() {
16
14
  'use strict';
17
15
 
18
16
  var React = require('react');
17
+ var _assign = require('object-assign');
19
18
 
19
+ // ATTENTION
20
+ // When adding new symbols to this file,
21
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
20
22
  // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
21
23
  // nor polyfill, then a plain number is used for performance.
22
24
  var REACT_ELEMENT_TYPE = 0xeac7;
@@ -37,6 +39,9 @@ var REACT_FUNDAMENTAL_TYPE = 0xead5;
37
39
  var REACT_RESPONDER_TYPE = 0xead6;
38
40
  var REACT_SCOPE_TYPE = 0xead7;
39
41
  var REACT_OPAQUE_ID_TYPE = 0xeae0;
42
+ var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
43
+ var REACT_OFFSCREEN_TYPE = 0xeae2;
44
+ var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
40
45
 
41
46
  if (typeof Symbol === 'function' && Symbol.for) {
42
47
  var symbolFor = Symbol.for;
@@ -58,6 +63,9 @@ if (typeof Symbol === 'function' && Symbol.for) {
58
63
  REACT_RESPONDER_TYPE = symbolFor('react.responder');
59
64
  REACT_SCOPE_TYPE = symbolFor('react.scope');
60
65
  REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
66
+ REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
67
+ REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
68
+ REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
61
69
  }
62
70
 
63
71
  var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
@@ -92,16 +100,12 @@ function printWarning(level, format, args) {
92
100
  // When changing this logic, you might want to also
93
101
  // update consoleWithStackDev.www.js as well.
94
102
  {
95
- var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
96
-
97
- if (!hasExistingStack) {
98
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
99
- var stack = ReactDebugCurrentFrame.getStackAddendum();
103
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
104
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
100
105
 
101
- if (stack !== '') {
102
- format += '%s';
103
- args = args.concat([stack]);
104
- }
106
+ if (stack !== '') {
107
+ format += '%s';
108
+ args = args.concat([stack]);
105
109
  }
106
110
 
107
111
  var argsWithFormat = args.map(function (item) {
@@ -113,23 +117,30 @@ function printWarning(level, format, args) {
113
117
  // eslint-disable-next-line react-internal/no-production-logging
114
118
 
115
119
  Function.prototype.apply.call(console[level], console, argsWithFormat);
116
-
117
- try {
118
- // --- Welcome to debugging React ---
119
- // This error was thrown as a convenience so that you can use this stack
120
- // to find the callsite that caused this warning to fire.
121
- var argIndex = 0;
122
- var message = 'Warning: ' + format.replace(/%s/g, function () {
123
- return args[argIndex++];
124
- });
125
- throw new Error(message);
126
- } catch (x) {}
127
120
  }
128
121
  }
129
122
 
123
+ // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
124
+
125
+ var enableScopeAPI = false; // Experimental Create Event Handle API.
126
+
130
127
  function isValidElementType(type) {
131
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
132
- type === exports.Fragment || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE);
128
+ if (typeof type === 'string' || typeof type === 'function') {
129
+ return true;
130
+ } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
131
+
132
+
133
+ if (type === exports.Fragment || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
134
+ return true;
135
+ }
136
+
137
+ if (typeof type === 'object' && type !== null) {
138
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
139
+ return true;
140
+ }
141
+ }
142
+
143
+ return false;
133
144
  }
134
145
 
135
146
  function getWrappedName(outerType, innerType, wrapperName) {
@@ -218,8 +229,358 @@ function getComponentName(type) {
218
229
  return null;
219
230
  }
220
231
 
232
+ // Helpers to patch console.logs to avoid logging during side-effect free
233
+ // replaying on render function. This currently only patches the object
234
+ // lazily which won't cover if the log function was extracted eagerly.
235
+ // We could also eagerly patch the method.
236
+ var disabledDepth = 0;
237
+ var prevLog;
238
+ var prevInfo;
239
+ var prevWarn;
240
+ var prevError;
241
+ var prevGroup;
242
+ var prevGroupCollapsed;
243
+ var prevGroupEnd;
244
+
245
+ function disabledLog() {}
246
+
247
+ disabledLog.__reactDisabledLog = true;
248
+ function disableLogs() {
249
+ {
250
+ if (disabledDepth === 0) {
251
+ /* eslint-disable react-internal/no-production-logging */
252
+ prevLog = console.log;
253
+ prevInfo = console.info;
254
+ prevWarn = console.warn;
255
+ prevError = console.error;
256
+ prevGroup = console.group;
257
+ prevGroupCollapsed = console.groupCollapsed;
258
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
259
+
260
+ var props = {
261
+ configurable: true,
262
+ enumerable: true,
263
+ value: disabledLog,
264
+ writable: true
265
+ }; // $FlowFixMe Flow thinks console is immutable.
266
+
267
+ Object.defineProperties(console, {
268
+ info: props,
269
+ log: props,
270
+ warn: props,
271
+ error: props,
272
+ group: props,
273
+ groupCollapsed: props,
274
+ groupEnd: props
275
+ });
276
+ /* eslint-enable react-internal/no-production-logging */
277
+ }
278
+
279
+ disabledDepth++;
280
+ }
281
+ }
282
+ function reenableLogs() {
283
+ {
284
+ disabledDepth--;
285
+
286
+ if (disabledDepth === 0) {
287
+ /* eslint-disable react-internal/no-production-logging */
288
+ var props = {
289
+ configurable: true,
290
+ enumerable: true,
291
+ writable: true
292
+ }; // $FlowFixMe Flow thinks console is immutable.
293
+
294
+ Object.defineProperties(console, {
295
+ log: _assign({}, props, {
296
+ value: prevLog
297
+ }),
298
+ info: _assign({}, props, {
299
+ value: prevInfo
300
+ }),
301
+ warn: _assign({}, props, {
302
+ value: prevWarn
303
+ }),
304
+ error: _assign({}, props, {
305
+ value: prevError
306
+ }),
307
+ group: _assign({}, props, {
308
+ value: prevGroup
309
+ }),
310
+ groupCollapsed: _assign({}, props, {
311
+ value: prevGroupCollapsed
312
+ }),
313
+ groupEnd: _assign({}, props, {
314
+ value: prevGroupEnd
315
+ })
316
+ });
317
+ /* eslint-enable react-internal/no-production-logging */
318
+ }
319
+
320
+ if (disabledDepth < 0) {
321
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
322
+ }
323
+ }
324
+ }
325
+
326
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
327
+ var prefix;
328
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
329
+ {
330
+ if (prefix === undefined) {
331
+ // Extract the VM specific prefix used by each line.
332
+ try {
333
+ throw Error();
334
+ } catch (x) {
335
+ var match = x.stack.trim().match(/\n( *(at )?)/);
336
+ prefix = match && match[1] || '';
337
+ }
338
+ } // We use the prefix to ensure our stacks line up with native stack frames.
339
+
340
+
341
+ return '\n' + prefix + name;
342
+ }
343
+ }
344
+ var reentry = false;
345
+ var componentFrameCache;
346
+
347
+ {
348
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
349
+ componentFrameCache = new PossiblyWeakMap();
350
+ }
351
+
352
+ function describeNativeComponentFrame(fn, construct) {
353
+ // If something asked for a stack inside a fake render, it should get ignored.
354
+ if (!fn || reentry) {
355
+ return '';
356
+ }
357
+
358
+ {
359
+ var frame = componentFrameCache.get(fn);
360
+
361
+ if (frame !== undefined) {
362
+ return frame;
363
+ }
364
+ }
365
+
366
+ var control;
367
+ reentry = true;
368
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
369
+
370
+ Error.prepareStackTrace = undefined;
371
+ var previousDispatcher;
372
+
373
+ {
374
+ previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
375
+ // for warnings.
376
+
377
+ ReactCurrentDispatcher.current = null;
378
+ disableLogs();
379
+ }
380
+
381
+ try {
382
+ // This should throw.
383
+ if (construct) {
384
+ // Something should be setting the props in the constructor.
385
+ var Fake = function () {
386
+ throw Error();
387
+ }; // $FlowFixMe
388
+
389
+
390
+ Object.defineProperty(Fake.prototype, 'props', {
391
+ set: function () {
392
+ // We use a throwing setter instead of frozen or non-writable props
393
+ // because that won't throw in a non-strict mode function.
394
+ throw Error();
395
+ }
396
+ });
397
+
398
+ if (typeof Reflect === 'object' && Reflect.construct) {
399
+ // We construct a different control for this case to include any extra
400
+ // frames added by the construct call.
401
+ try {
402
+ Reflect.construct(Fake, []);
403
+ } catch (x) {
404
+ control = x;
405
+ }
406
+
407
+ Reflect.construct(fn, [], Fake);
408
+ } else {
409
+ try {
410
+ Fake.call();
411
+ } catch (x) {
412
+ control = x;
413
+ }
414
+
415
+ fn.call(Fake.prototype);
416
+ }
417
+ } else {
418
+ try {
419
+ throw Error();
420
+ } catch (x) {
421
+ control = x;
422
+ }
423
+
424
+ fn();
425
+ }
426
+ } catch (sample) {
427
+ // This is inlined manually because closure doesn't do it for us.
428
+ if (sample && control && typeof sample.stack === 'string') {
429
+ // This extracts the first frame from the sample that isn't also in the control.
430
+ // Skipping one frame that we assume is the frame that calls the two.
431
+ var sampleLines = sample.stack.split('\n');
432
+ var controlLines = control.stack.split('\n');
433
+ var s = sampleLines.length - 1;
434
+ var c = controlLines.length - 1;
435
+
436
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
437
+ // We expect at least one stack frame to be shared.
438
+ // Typically this will be the root most one. However, stack frames may be
439
+ // cut off due to maximum stack limits. In this case, one maybe cut off
440
+ // earlier than the other. We assume that the sample is longer or the same
441
+ // and there for cut off earlier. So we should find the root most frame in
442
+ // the sample somewhere in the control.
443
+ c--;
444
+ }
445
+
446
+ for (; s >= 1 && c >= 0; s--, c--) {
447
+ // Next we find the first one that isn't the same which should be the
448
+ // frame that called our sample function and the control.
449
+ if (sampleLines[s] !== controlLines[c]) {
450
+ // In V8, the first line is describing the message but other VMs don't.
451
+ // If we're about to return the first line, and the control is also on the same
452
+ // line, that's a pretty good indicator that our sample threw at same line as
453
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
454
+ // This can happen if you passed a class to function component, or non-function.
455
+ if (s !== 1 || c !== 1) {
456
+ do {
457
+ s--;
458
+ c--; // We may still have similar intermediate frames from the construct call.
459
+ // The next one that isn't the same should be our match though.
460
+
461
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
462
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
463
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
464
+
465
+ {
466
+ if (typeof fn === 'function') {
467
+ componentFrameCache.set(fn, _frame);
468
+ }
469
+ } // Return the line we found.
470
+
471
+
472
+ return _frame;
473
+ }
474
+ } while (s >= 1 && c >= 0);
475
+ }
476
+
477
+ break;
478
+ }
479
+ }
480
+ }
481
+ } finally {
482
+ reentry = false;
483
+
484
+ {
485
+ ReactCurrentDispatcher.current = previousDispatcher;
486
+ reenableLogs();
487
+ }
488
+
489
+ Error.prepareStackTrace = previousPrepareStackTrace;
490
+ } // Fallback to just using the name if we couldn't make it throw.
491
+
492
+
493
+ var name = fn ? fn.displayName || fn.name : '';
494
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
495
+
496
+ {
497
+ if (typeof fn === 'function') {
498
+ componentFrameCache.set(fn, syntheticFrame);
499
+ }
500
+ }
501
+
502
+ return syntheticFrame;
503
+ }
504
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
505
+ {
506
+ return describeNativeComponentFrame(fn, false);
507
+ }
508
+ }
509
+
510
+ function shouldConstruct(Component) {
511
+ var prototype = Component.prototype;
512
+ return !!(prototype && prototype.isReactComponent);
513
+ }
514
+
515
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
516
+
517
+ if (type == null) {
518
+ return '';
519
+ }
520
+
521
+ if (typeof type === 'function') {
522
+ {
523
+ return describeNativeComponentFrame(type, shouldConstruct(type));
524
+ }
525
+ }
526
+
527
+ if (typeof type === 'string') {
528
+ return describeBuiltInComponentFrame(type);
529
+ }
530
+
531
+ switch (type) {
532
+ case REACT_SUSPENSE_TYPE:
533
+ return describeBuiltInComponentFrame('Suspense');
534
+
535
+ case REACT_SUSPENSE_LIST_TYPE:
536
+ return describeBuiltInComponentFrame('SuspenseList');
537
+ }
538
+
539
+ if (typeof type === 'object') {
540
+ switch (type.$$typeof) {
541
+ case REACT_FORWARD_REF_TYPE:
542
+ return describeFunctionComponentFrame(type.render);
543
+
544
+ case REACT_MEMO_TYPE:
545
+ // Memo may contain any component type so we recursively resolve it.
546
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
547
+
548
+ case REACT_BLOCK_TYPE:
549
+ return describeFunctionComponentFrame(type._render);
550
+
551
+ case REACT_LAZY_TYPE:
552
+ {
553
+ var lazyComponent = type;
554
+ var payload = lazyComponent._payload;
555
+ var init = lazyComponent._init;
556
+
557
+ try {
558
+ // Lazy may contain any component type so we recursively resolve it.
559
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
560
+ } catch (x) {}
561
+ }
562
+ }
563
+ }
564
+
565
+ return '';
566
+ }
567
+
221
568
  var loggedTypeFailures = {};
222
- function checkPropTypes(typeSpecs, values, location, componentName) {
569
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
570
+
571
+ function setCurrentlyValidatingElement(element) {
572
+ {
573
+ if (element) {
574
+ var owner = element._owner;
575
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
576
+ ReactDebugCurrentFrame.setExtraStackFrame(stack);
577
+ } else {
578
+ ReactDebugCurrentFrame.setExtraStackFrame(null);
579
+ }
580
+ }
581
+ }
582
+
583
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
223
584
  {
224
585
  // $FlowFixMe This is okay but Flow doesn't know it.
225
586
  var has = Function.call.bind(Object.prototype.hasOwnProperty);
@@ -245,15 +606,22 @@ function checkPropTypes(typeSpecs, values, location, componentName) {
245
606
  }
246
607
 
247
608
  if (error$1 && !(error$1 instanceof Error)) {
609
+ setCurrentlyValidatingElement(element);
610
+
248
611
  error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
612
+
613
+ setCurrentlyValidatingElement(null);
249
614
  }
250
615
 
251
616
  if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
252
617
  // Only monitor this failure once because there tends to be a lot of the
253
618
  // same error.
254
619
  loggedTypeFailures[error$1.message] = true;
620
+ setCurrentlyValidatingElement(element);
255
621
 
256
622
  error('Failed %s type: %s', location, error$1.message);
623
+
624
+ setCurrentlyValidatingElement(null);
257
625
  }
258
626
  }
259
627
  }
@@ -496,7 +864,20 @@ function jsxDEV(type, config, maybeKey, source, self) {
496
864
  }
497
865
 
498
866
  var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
499
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
867
+ var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
868
+
869
+ function setCurrentlyValidatingElement$1(element) {
870
+ {
871
+ if (element) {
872
+ var owner = element._owner;
873
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
874
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
875
+ } else {
876
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
877
+ }
878
+ }
879
+ }
880
+
500
881
  var propTypesMisspellWarningShown;
501
882
 
502
883
  {
@@ -602,11 +983,11 @@ function validateExplicitKey(element, parentType) {
602
983
  childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
603
984
  }
604
985
 
605
- ReactDebugCurrentFrame.setCurrentlyValidatingElement(element);
986
+ setCurrentlyValidatingElement$1(element);
606
987
 
607
988
  error('Each child in a list should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
608
989
 
609
- ReactDebugCurrentFrame.setCurrentlyValidatingElement(null);
990
+ setCurrentlyValidatingElement$1(null);
610
991
  }
611
992
  }
612
993
  /**
@@ -689,9 +1070,7 @@ function validatePropTypes(element) {
689
1070
  }
690
1071
 
691
1072
  if (propTypes) {
692
- ReactDebugCurrentFrame.setCurrentlyValidatingElement(element);
693
- checkPropTypes(propTypes, element.props, 'prop', name);
694
- ReactDebugCurrentFrame.setCurrentlyValidatingElement(null);
1073
+ checkPropTypes(propTypes, element.props, 'prop', name, element);
695
1074
  } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
696
1075
  propTypesMisspellWarningShown = true;
697
1076
 
@@ -711,24 +1090,28 @@ function validatePropTypes(element) {
711
1090
 
712
1091
  function validateFragmentProps(fragment) {
713
1092
  {
714
- ReactDebugCurrentFrame.setCurrentlyValidatingElement(fragment);
715
1093
  var keys = Object.keys(fragment.props);
716
1094
 
717
1095
  for (var i = 0; i < keys.length; i++) {
718
1096
  var key = keys[i];
719
1097
 
720
1098
  if (key !== 'children' && key !== 'key') {
1099
+ setCurrentlyValidatingElement$1(fragment);
1100
+
721
1101
  error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
722
1102
 
1103
+ setCurrentlyValidatingElement$1(null);
723
1104
  break;
724
1105
  }
725
1106
  }
726
1107
 
727
1108
  if (fragment.ref !== null) {
1109
+ setCurrentlyValidatingElement$1(fragment);
1110
+
728
1111
  error('Invalid attribute `ref` supplied to `React.Fragment`.');
729
- }
730
1112
 
731
- ReactDebugCurrentFrame.setCurrentlyValidatingElement(null);
1113
+ setCurrentlyValidatingElement$1(null);
1114
+ }
732
1115
  }
733
1116
  }
734
1117