From 27c5795ea5b036fda98292a6486353ba4dc47ed3 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Fri, 25 Sep 2020 09:23:29 +0200 Subject: [PATCH] Fix version check in models directory [ci skip] --- website/src/templates/models.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/src/templates/models.js b/website/src/templates/models.js index 3c5e9d2a4..a1a6f3b5a 100644 --- a/website/src/templates/models.js +++ b/website/src/templates/models.js @@ -69,7 +69,12 @@ function isStableVersion(v) { function getLatestVersion(modelId, compatibility) { for (let [version, models] of Object.entries(compatibility)) { if (isStableVersion(version) && models[modelId]) { - return models[modelId][0] + const modelVersions = models[modelId] + for (let modelVersion of modelVersions) { + if (isStableVersion(modelVersion)) { + return modelVersion + } + } } } }