File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353 . map ( ( li ) => li . querySelector ( 'a' ) )
5454 . filter ( ( a ) => a && / \. h t m l ? $ / . test ( a . getAttribute ( 'href' ) || '' ) ) ;
5555
56- // Only resource-index pages have an "Examples" list of links like this;
57- // skip anything else (homepage grid, keyword lists on example pages).
58- if ( ! entries . length || entries . length !== items . length ) {
59- return null ;
60- }
61-
6256 const table = document . createElement ( 'table' ) ;
6357 table . className = 'examples-table' ;
6458
348342}
349343
350344document . addEventListener ( 'DOMContentLoaded' , ( ) => {
345+ const header = document . querySelector ( '#examples' ) ;
351346 const lists = document . querySelectorAll ( '.site-main__inner > ul' ) ;
347+ if ( header === undefined || header === null ) {
348+ return ;
349+ }
352350 Array . prototype . forEach . call ( lists , ( list ) => {
353351 const built = buildTable ( list ) ;
354352 if ( ! built ) {
You can’t perform that action at this time.
0 commit comments