File tree Expand file tree Collapse file tree
packages/@devtoolcss-inspector/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,15 +21,15 @@ export class NodeWrapper {
2121 }
2222 protected async callFunctionOn ( args : any [ ] , functionDeclaration : string ) {
2323 // always do live check first
24- const nodeId = this . inspector . getCdpNode ( this ) ;
25- if ( ! nodeId ) {
24+ const cdpNode = this . inspector . getCdpNode ( this ) ;
25+ if ( ! cdpNode ) {
2626 throw new Error ( "Node is not tracked in the inspector" ) ;
2727 }
2828
2929 if ( ! this . objectId ) {
3030 // Get the remote object ID for this node
3131 const { object } = await this . inspector . sendCommand ( "DOM.resolveNode" , {
32- nodeId,
32+ nodeId : cdpNode . nodeId ,
3333 } ) ;
3434 this . objectId = object . objectId ;
3535 }
Original file line number Diff line number Diff line change @@ -405,6 +405,8 @@ export class Inspector extends EventEmitter {
405405 }
406406
407407 private async initDOM ( ) : Promise < void > {
408+ this . idToNodes . clear ( ) ;
409+ this . nodeToId . clear ( ) ;
408410 const { root } = await this . sendCommand ( "DOM.getDocument" , {
409411 depth : 0 ,
410412 } ) ;
You can’t perform that action at this time.
0 commit comments