File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
lib/ffdocs/view/javascript Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -95,9 +95,7 @@ class FrontSearchInput extends SearchInput {
9595 collectItemData ( ) {
9696 let items = [ ]
9797 for ( const elem of document . querySelectorAll ( "nav details a" ) ) {
98- // To get the name of the item we have to use firstChild, since some
99- // Chromium-based browser does not support innerText on hidden elements.
100- let name = elem . firstChild . nodeValue ;
98+ let name = elem . textContent ;
10199
102100 items . push ( {
103101 name,
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ class NavSearchInput extends SearchInput {
4848
4949 // Hide links that does not contains the words in the input.
5050 for ( const elem of document . querySelectorAll ( "nav details a, nav details .version-label" ) ) {
51- let link = elem . innerText ;
51+ let link = elem . textContent ;
5252 let visible = words . every ( w => link . includes ( w ) ) ;
5353 elem . classList . toggle ( "hidden" , ! visible ) ;
5454
You can’t perform that action at this time.
0 commit comments