File tree 2 files changed +13
-4
lines changed
2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -1364,10 +1364,8 @@ function parseModelString(
1364
1364
// happened.
1365
1365
Object . defineProperty ( parentObject , key , {
1366
1366
get : function ( ) {
1367
- // We intentionally don't throw an error object here because it looks better
1368
- // without the stack in the console which isn't useful anyway.
1369
- // eslint-disable-next-line no-throw-literal
1370
- throw (
1367
+ // TODO: We should ideally throw here to indicate a difference.
1368
+ return (
1371
1369
'This object has been omitted by React in the console log ' +
1372
1370
'to avoid sending too much data from the server. Try logging smaller ' +
1373
1371
'or more specific objects.'
Original file line number Diff line number Diff line change @@ -3465,7 +3465,18 @@ function renderConsoleValue(
3465
3465
if ( element . _owner != null ) {
3466
3466
outlineComponentInfo ( request , element . _owner ) ;
3467
3467
}
3468
+ if ( typeof element . type === 'object' && element . type !== null ) {
3469
+ // If the type is an object it can get cut off which shouldn't happen here.
3470
+ doNotLimit . add ( element . type ) ;
3471
+ }
3472
+ if ( typeof element . key === 'object' && element . key !== null ) {
3473
+ // This should never happen but just in case.
3474
+ doNotLimit . add ( element . key ) ;
3475
+ }
3468
3476
doNotLimit . add ( element . props ) ;
3477
+ if ( element . _owner !== null ) {
3478
+ doNotLimit . add ( element . _owner ) ;
3479
+ }
3469
3480
3470
3481
if ( enableOwnerStacks ) {
3471
3482
let debugStack : null | ReactStackTrace = null ;
You can’t perform that action at this time.
0 commit comments