From 46965b10fa7df808c131acfc6b7a74e0f7a47265 Mon Sep 17 00:00:00 2001 From: Stefan Peters Date: Tue, 21 Jun 2022 11:06:44 +0200 Subject: [PATCH] Skohub: Another fix for search (#29) --- src/providers/skohub-provider.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/providers/skohub-provider.js b/src/providers/skohub-provider.js index 647fff0..064ae8c 100644 --- a/src/providers/skohub-provider.js +++ b/src/providers/skohub-provider.js @@ -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}` }