File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -1070,15 +1070,14 @@ export class SpeechExplorer
10701070 const sub = this . subtrees . get ( id ) ;
10711071 const children : Set < string > = new Set ( ) ;
10721072 for ( const node of nodes ) {
1073- Array . from ( node . querySelectorAll ( `[data-semantic-id]` ) ) . forEach ( ( x ) =>
1074- children . add ( x . getAttribute ( ' data-semantic-id' ) )
1075- ) ;
1073+ (
1074+ Array . from ( node . querySelectorAll ( `[ data-semantic-id]` ) ) as HTMLElement [ ]
1075+ ) . forEach ( ( x ) => children . add ( this . nodeId ( x ) ) ) ;
10761076 }
10771077 const rest = setdifference ( sub , children ) ;
1078- return [ ...rest ] . map ( ( child ) => {
1079- const node = this . node . querySelector ( `[data-semantic-id="${ child } "]` ) ;
1080- return node as HTMLElement ;
1081- } ) ;
1078+ return [ ...rest ]
1079+ . map ( ( child ) => this . getNode ( child ) )
1080+ . filter ( ( node ) => node !== null ) ;
10821081 }
10831082
10841083 /**
You can’t perform that action at this time.
0 commit comments