File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1- importScripts ( 'https://unpkg.com/[email protected] /lunr.min.js' ) ; 1+ if ( typeof importScripts === 'function' ) {
2+ importScripts ( 'https://unpkg.com/[email protected] /lunr.min.js' ) ; 3+ }
24
35let idx ;
46const resultDetails = new Map ( ) ; // Will hold the data for the search results (titles and summaries)
@@ -53,10 +55,10 @@ self.onmessage = async function (event) {
5355
5456 const docs = new Map ( ) ;
5557 results . forEach ( ( result ) => {
56- if ( resultDetails . get ( result . ref ) === undefined ) {
58+ if ( resultDetails . get ( result . ref ) === undefined ) {
5759 return ;
5860 }
59-
61+
6062 docs . set ( result . ref , resultDetails . get ( result . ref ) ) ;
6163 } ) ;
6264
Original file line number Diff line number Diff line change 2626 {{ partial "footer.html" . }}
2727 </ div >
2828 {{ partial "scripts.html" . }}
29- {{ block "main" . }}{{ end }}
3029 {{ $script := resources.Get "js/worker.js"}}
3130 < script src ="{{ $script.Permalink }} "> </ script >
3231 </ body >
You can’t perform that action at this time.
0 commit comments