File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,8 @@ async function fetchResults(remoteInput: RemoteInputElement, checkCurrentQuery:
7070
7171 remoteInput . dispatchEvent ( new CustomEvent ( 'loadstart' ) )
7272 remoteInput . setAttribute ( 'loading' , '' )
73- let response , html
73+ let response
74+ let html = ''
7475 try {
7576 response = await fetch ( url , {
7677 credentials : 'same-origin' ,
@@ -79,9 +80,9 @@ async function fetchResults(remoteInput: RemoteInputElement, checkCurrentQuery:
7980 html = await response . text ( )
8081 remoteInput . dispatchEvent ( new CustomEvent ( 'load' ) )
8182 } catch {
82- // noop
83+ // Network errors handled below.
8384 }
84- if ( response && response . ok && html ) {
85+ if ( response && response . ok ) {
8586 resultsContainer . innerHTML = html
8687 } else {
8788 remoteInput . dispatchEvent ( new CustomEvent ( 'error' ) )
You can’t perform that action at this time.
0 commit comments