Skip to content

Commit d903f1f

Browse files
authored
Merge pull request #13 from github/relative-url
Fix using relative URLs in src
2 parents 0e624ea + e802f49 commit d903f1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ async function fetchResults(remoteInput: RemoteInputElement, checkCurrentQuery:
6363
const resultsContainer = document.getElementById(remoteInput.getAttribute('aria-owns') || '')
6464
if (!resultsContainer) return
6565

66-
const url = new URL(src, window.location.origin)
66+
const url = new URL(src, window.location.href)
6767
const params = new URLSearchParams(url.search)
6868
params.append(remoteInput.getAttribute('param') || 'q', query)
6969
url.search = params.toString()

0 commit comments

Comments
 (0)