This repository was archived by the owner on Sep 21, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-12
lines changed
packages/devtools-reps/src/object-inspector Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -307,9 +307,11 @@ class ObjectInspector extends Component {
307307 repProps . mode = MODE . TINY ;
308308 }
309309
310- repProps . member = {
311- open : nodeHasFullText ( item ) && expanded
312- } ;
310+ if ( nodeIsLongString ( item ) ) {
311+ repProps . member = {
312+ open : nodeHasFullText ( item ) && expanded
313+ } ;
314+ }
313315
314316 return {
315317 label,
Original file line number Diff line number Diff line change @@ -73,7 +73,10 @@ function loadItemProperties(
7373 }
7474
7575 if ( shouldLoadFullText ( item , loadedProperties ) ) {
76- promises . push ( getFullText ( getObjectClient ( ) , getValue ( item ) ) ) ;
76+ promises . push (
77+ getFullText ( getObjectClient ( ) , getValue ( item ) )
78+ . then ( fullString => ( { fullString} ) )
79+ ) ;
7780 }
7881
7982 return Promise . all ( promises ) . then ( mergeResponses ) ;
@@ -95,8 +98,8 @@ function mergeResponses(responses: Array<Object>) : Object {
9598 data . prototype = response . prototype ;
9699 }
97100
98- if ( typeof response === "string" ) {
99- data . fullText = response ;
101+ if ( response . fullText ) {
102+ data . fullText = response . response ;
100103 }
101104 }
102105
Original file line number Diff line number Diff line change @@ -249,12 +249,10 @@ function nodeHasEntries(
249249 return false ;
250250 }
251251
252- return [
253- "Map" ,
254- "Set" ,
255- "WeakMap" ,
256- "WeakSet"
257- ] . includes ( value . class ) ;
252+ return value . class === "Map"
253+ || value . class === "Set"
254+ || value . class === "WeakMap"
255+ || value . class === "WeakSet" ;
258256}
259257
260258function nodeHasAllEntriesInPreview ( item : Node ) : boolean {
You can’t perform that action at this time.
0 commit comments