Fix version check in models directory [ci skip]

This commit is contained in:
Ines Montani 2020-09-25 09:23:29 +02:00
parent 7489d02dea
commit 27c5795ea5
1 changed files with 6 additions and 1 deletions

View File

@ -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
}
}
}
}
}