File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
packages/react-client/src Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ function addValueToProperties(
9696 } else {
9797 // $FlowFixMe[method-unbinding]
9898 const objectToString = Object . prototype . toString . call ( value ) ;
99- const objectName = objectToString . slice ( 8 , objectToString . length - 1 ) ;
99+ let objectName = objectToString . slice ( 8 , objectToString . length - 1 ) ;
100100 if ( objectName === 'Array' ) {
101101 const array : Array < any > = (value: any);
102102 const kind = getArrayKind(array);
@@ -112,6 +112,12 @@ function addValueToProperties(
112112 return;
113113 }
114114 }
115+ if ( objectName === 'Object ') {
116+ const proto : any = Object . getPrototypeOf ( value ) ;
117+ if ( proto && typeof proto . constructor === 'function' ) {
118+ objectName = proto . constructor . name ;
119+ }
120+ }
115121 properties . push ( [
116122 '\xa0\xa0' . repeat ( indent ) + propertyName ,
117123 objectName === 'Object' ? '' : objectName ,
You can’t perform that action at this time.
0 commit comments