File tree 2 files changed +2
-4
lines changed
lib/ffdocs/view/javascript
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 {
95
95
collectItemData ( ) {
96
96
let items = [ ]
97
97
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 ;
101
99
102
100
items . push ( {
103
101
name,
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ class NavSearchInput extends SearchInput {
48
48
49
49
// Hide links that does not contains the words in the input.
50
50
for ( const elem of document . querySelectorAll ( "nav details a, nav details .version-label" ) ) {
51
- let link = elem . innerText ;
51
+ let link = elem . textContent ;
52
52
let visible = words . every ( w => link . includes ( w ) ) ;
53
53
elem . classList . toggle ( "hidden" , ! visible ) ;
54
54
You can’t perform that action at this time.
0 commit comments