File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -485,6 +485,14 @@ function describeValue(val: any): string {
485485 const isObject = type === 'object' ;
486486 out . push ( `Value: ${ val } ` ) ;
487487 out . push ( `Type: ${ type } ` ) ;
488+ try {
489+ const constructorName = val ?. constructor ?. name ; // eslint-disable-line
490+ if ( constructorName ) {
491+ out . push ( `Constructor name: ${ constructorName } ` ) ;
492+ }
493+ } catch {
494+ // Ignore errors when getting keys
495+ }
488496
489497 if ( val && isObject ) {
490498 try {
@@ -507,7 +515,7 @@ function describeValue(val: any): string {
507515 }
508516
509517 try {
510- out . push ( `Prototype : ${ Object . prototype . toString . call ( val ) } ` ) ;
518+ out . push ( `toStringTag : ${ Object . prototype . toString . call ( val ) } ` ) ;
511519 } catch {
512520 // Ignore errors when getting object type
513521 }
You can’t perform that action at this time.
0 commit comments