diff --git a/index.js b/index.js index 45e12d6..9352151 100644 --- a/index.js +++ b/index.js @@ -63,7 +63,7 @@ async function fetchResults(remoteInput: RemoteInputElement, checkCurrentQuery: const resultsContainer = document.getElementById(remoteInput.getAttribute('aria-owns') || '') if (!resultsContainer) return - const url = new URL(src, window.location.origin) + const url = new URL(src, window.location.href) const params = new URLSearchParams(url.search) params.append(remoteInput.getAttribute('param') || 'q', query) url.search = params.toString()