Skip to content

Commit

Permalink
Skohub: Another fix for search (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Jun 21, 2022
1 parent 7a39e82 commit 46965b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/skohub-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@ export default class SkohubProvider extends BaseProvider {
this._index[scheme.uri] = {}
}
// Iterate over languages and use the first one that has an index
for (const lang of this.languages) {
for (const lang of [""].concat(this.languages)) {
if (this._index[scheme.uri][lang]) {
index = this._index[scheme.uri][lang]
break
}
try {
let postfix = `.${lang}.index`
let postfix = lang ? `.${lang}.index` : ".index"
if (scheme.uri.endsWith("/")) {
postfix = `index${postfix}`
}
Expand Down

0 comments on commit 46965b1

Please sign in to comment.