This repository was archived by the owner on Sep 21, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
packages/devtools-reps/src/object-inspector/utils Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ async function getPrototype(
8484async function getFullText (
8585 objectClient : ObjectClient ,
8686 object : NodeContents ,
87- ) : Promise < string > {
87+ ) : Promise < ? string | { } > {
8888 if ( typeof objectClient . getString !== "function" ) {
8989 console . error ( "objectClient.getString is not a function" ) ;
9090 return Promise . resolve ( { } ) ;
Original file line number Diff line number Diff line change @@ -225,8 +225,8 @@ function nodeIsLongString(
225225function nodeHasFullText (
226226 item : Node
227227) : boolean {
228- return nodeIsLongString ( item )
229- && getValue ( item ) . hasOwnProperty ( "fullText" ) ;
228+ const value = getValue ( item ) ;
229+ return nodeIsLongString ( item ) && value . hasOwnProperty ( "fullText" ) ;
230230}
231231
232232function nodeHasAccessors ( item : Node ) : boolean {
@@ -740,6 +740,7 @@ function getChildren(options: {
740740 }
741741
742742 if ( nodeIsLongString ( item ) && hasLoadedProps ) {
743+ // Set longString object's fullText to fetched one.
743744 item. contents . value . fullText = loadedProps . fullText ;
744745 return addToCache ( item ) ;
745746 }
You can’t perform that action at this time.
0 commit comments