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(
96
96
} else {
97
97
// $FlowFixMe[method-unbinding]
98
98
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 ) ;
100
100
if ( objectName === 'Array' ) {
101
101
const array : Array < any > = (value: any);
102
102
const kind = getArrayKind(array);
@@ -112,6 +112,12 @@ function addValueToProperties(
112
112
return;
113
113
}
114
114
}
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
+ }
115
121
properties . push ( [
116
122
'\xa0\xa0' . repeat ( indent ) + propertyName ,
117
123
objectName === 'Object' ? '' : objectName ,
You can’t perform that action at this time.
0 commit comments