File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 121121 const CLOUD_REMOTE_SOURCES = cloudFilenames.map(function(filename) { return searchindexBase + '/' + filename; });
122122
123123 const indices = [];
124- const main = await loadWithFallback(MAIN_REMOTE_SOURCES , '/searchindex-book.js', false); if(main) indices.push(main);
125- const cloud= await loadWithFallback(CLOUD_REMOTE_SOURCES, '/searchindex.js', true ); if(cloud) indices.push(cloud);
124+ /* Local fallback on book origin exists as /searchindex.js (mdBook default output). */
125+ const main = await loadWithFallback(MAIN_REMOTE_SOURCES , '/searchindex.js', false); if(main) indices.push(main);
126+ /* Cloud local fallback does not exist on book origin; rely on remote cloud index only. */
127+ const cloud= await loadWithFallback(CLOUD_REMOTE_SOURCES, null, true); if(cloud) indices.push(cloud);
126128 if(!indices.length){ postMessage({ready:false, error:'no-index'}); return; }
127129
128130 /* build index objects */
271273 listOut . classList . toggle ( 'hidden' , ! docs . length ) ;
272274 } ;
273275 } ) ( ) ;
274-
276+
You can’t perform that action at this time.
0 commit comments