Skip to content

Commit 7a39e82

Browse files
committed
Skohub: Fix search for scheme URIs that end with slash (#29)
1 parent 59a1eff commit 7a39e82

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/providers/skohub-provider.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,11 @@ export default class SkohubProvider extends BaseProvider {
207207
break
208208
}
209209
try {
210-
let postfix = ".index"
210+
let postfix = `.${lang}.index`
211211
if (scheme.uri.endsWith("/")) {
212-
postfix = "index.index"
212+
postfix = `index${postfix}`
213213
}
214-
const { data } = await axios.get(`${scheme.uri}.${lang}${postfix}`)
214+
const { data } = await axios.get(`${scheme.uri}${postfix}`)
215215
index = FlexSearch.create()
216216
index.import(data)
217217
this._index[scheme.uri][lang] = index

0 commit comments

Comments
 (0)