@@ -23,12 +23,11 @@ __DEV__ &&
2323 )
2424 args [ _key2 - 1 ] = arguments [ _key2 ] ;
2525 _len2 = format ;
26- _key2 = Error ( "react-stack-top-frame" ) ;
27- var ReactSharedInternals =
26+ _key2 =
2827 require ( "react" ) . __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE ;
29- null != ReactSharedInternals &&
30- ReactSharedInternals . getCurrentStack &&
31- ( ( _key2 = ReactSharedInternals . getCurrentStack ( _key2 ) ) ,
28+ null != _key2 &&
29+ _key2 . getCurrentStack &&
30+ ( ( _key2 = _key2 . getCurrentStack ( ) ) ,
3231 "" !== _key2 && ( ( _len2 += "%s" ) , args . push ( _key2 ) ) ) ;
3332 args . unshift ( _len2 ) ;
3433 args . unshift ( ! 1 ) ;
@@ -182,8 +181,14 @@ __DEV__ &&
182181 } catch ( x ) {
183182 var match = x . stack . trim ( ) . match ( / \n ( * ( a t ) ? ) / ) ;
184183 prefix = ( match && match [ 1 ] ) || "" ;
184+ suffix =
185+ - 1 < x . stack . indexOf ( "\n at" )
186+ ? " (<anonymous>)"
187+ : - 1 < x . stack . indexOf ( "@" )
188+ ? "@unknown:0:0"
189+ : "" ;
185190 }
186- return "\n" + prefix + name ;
191+ return "\n" + prefix + name + suffix ;
187192 }
188193 function describeNativeComponentFrame ( fn , construct ) {
189194 if ( ! fn || reentry ) return "" ;
@@ -593,13 +598,15 @@ __DEV__ &&
593598 null === type
594599 ? ( isStaticChildren = "null" )
595600 : isArrayImpl ( type )
596- ? ( isStaticChildren = "array" )
597- : void 0 !== type && type . $$typeof === REACT_ELEMENT_TYPE
598- ? ( ( isStaticChildren =
599- "<" + ( getComponentNameFromType ( type . type ) || "Unknown" ) + " />" ) ,
600- ( children =
601- " Did you accidentally export a JSX literal instead of a component?" ) )
602- : ( isStaticChildren = typeof type ) ;
601+ ? ( isStaticChildren = "array" )
602+ : void 0 !== type && type . $$typeof === REACT_ELEMENT_TYPE
603+ ? ( ( isStaticChildren =
604+ "<" +
605+ ( getComponentNameFromType ( type . type ) || "Unknown" ) +
606+ " />" ) ,
607+ ( children =
608+ " Did you accidentally export a JSX literal instead of a component?" ) )
609+ : ( isStaticChildren = typeof type ) ;
603610 error (
604611 "React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s" ,
605612 isStaticChildren ,
@@ -633,11 +640,7 @@ __DEV__ &&
633640 hasValidKey ( config ) &&
634641 ( checkKeyStringCoercion ( config . key ) , ( children = "" + config . key ) ) ;
635642 hasValidRef ( config ) && warnIfStringRefCannotBeAutoConverted ( config , self ) ;
636- if (
637- ( ! enableFastJSXWithoutStringRefs &&
638- ( ! enableFastJSXWithStringRefs || "ref" in config ) ) ||
639- "key" in config
640- ) {
643+ if ( "ref" in config || "key" in config ) {
641644 maybeKey = { } ;
642645 for ( var propName in config )
643646 "key" !== propName &&
@@ -805,12 +808,11 @@ __DEV__ &&
805808 }
806809 var React = require ( "react" ) ,
807810 dynamicFeatureFlags = require ( "ReactFeatureFlags" ) ,
808- enableDebugTracing = dynamicFeatureFlags . enableDebugTracing ,
809- enableTransitionTracing = dynamicFeatureFlags . enableTransitionTracing ,
810- enableRenderableContext = dynamicFeatureFlags . enableRenderableContext ,
811811 disableDefaultPropsExceptForClasses =
812812 dynamicFeatureFlags . disableDefaultPropsExceptForClasses ,
813- enableFastJSX = dynamicFeatureFlags . enableFastJSX ,
813+ enableDebugTracing = dynamicFeatureFlags . enableDebugTracing ,
814+ enableRenderableContext = dynamicFeatureFlags . enableRenderableContext ,
815+ enableTransitionTracing = dynamicFeatureFlags . enableTransitionTracing ,
814816 renameElementSymbol = dynamicFeatureFlags . renameElementSymbol ,
815817 disableLegacyMode = dynamicFeatureFlags . disableLegacyMode ;
816818 dynamicFeatureFlags = Symbol . for ( "react.element" ) ;
@@ -853,6 +855,7 @@ __DEV__ &&
853855 prevGroupEnd ;
854856 disabledLog . __reactDisabledLog = ! 0 ;
855857 var prefix ,
858+ suffix ,
856859 reentry = ! 1 ;
857860 var componentFrameCache = new (
858861 "function" === typeof WeakMap ? WeakMap : Map
@@ -861,9 +864,7 @@ __DEV__ &&
861864 specialPropKeyWarningShown ;
862865 var didWarnAboutStringRefs = { } ;
863866 var didWarnAboutElementRef = { } ;
864- var enableFastJSXWithStringRefs = enableFastJSX && ! 0 ,
865- enableFastJSXWithoutStringRefs = enableFastJSXWithStringRefs && ! 1 ,
866- didWarnAboutKeySpread = { } ,
867+ var didWarnAboutKeySpread = { } ,
867868 ownerHasKeyUseWarning = { } ;
868869 exports . Fragment = REACT_FRAGMENT_TYPE ;
869870 exports . jsxDEV = function (
0 commit comments