Skip to content

Commit

Permalink
Skohub: Fix search for scheme URIs that end with slash (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Jun 21, 2022
1 parent 59a1eff commit 7a39e82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/providers/skohub-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ export default class SkohubProvider extends BaseProvider {
break
}
try {
let postfix = ".index"
let postfix = `.${lang}.index`
if (scheme.uri.endsWith("/")) {
postfix = "index.index"
postfix = `index${postfix}`
}
const { data } = await axios.get(`${scheme.uri}.${lang}${postfix}`)
const { data } = await axios.get(`${scheme.uri}${postfix}`)
index = FlexSearch.create()
index.import(data)
this._index[scheme.uri][lang] = index
Expand Down

0 comments on commit 7a39e82

Please sign in to comment.