Skip to content

Commit

Permalink
Fix use of backend with query parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtich committed Mar 12, 2024
1 parent 1ed9640 commit e052b3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/backends.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class FileBackend {

export class ApiBackend {
constructor( base, log ) {
this.base = base.replace(/\/$/,"")
this.base = base.replace(/\/$/,"").replace(/\?.*/,"")
this.log = log
}

Expand Down Expand Up @@ -87,6 +87,7 @@ export class ApiBackend {

export async function initBackend({ backend, log }) {
if (backend.match(/^https?:/)) {

return new ApiBackend(backend, log)
} else {
return new FileBackend(backend, log)
Expand Down

0 comments on commit e052b3b

Please sign in to comment.