Skip to content

Commit

Permalink
Fix rootURL assignment in main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
hanayik committed May 22, 2024
1 parent 3d51687 commit bb88704
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ async function main() {
await ensureConformed()
const model = inferenceModelsList[this.selectedIndex]
const opts = brainChopOpts
opts.rootURL = location.href
// opts.rootURL should be the url without the query string
const urlParams = new URL(window.location.href)
// remove the query string
opts.rootURL = urlParams.origin + urlParams.pathname
const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
// [::1] is the IPv6 localhost address.
Expand Down

0 comments on commit bb88704

Please sign in to comment.