Fix version check in models directory [ci skip]

This commit is contained in:
Ines Montani 2020-09-25 09:23:29 +02:00
parent f5d230ba00
commit 1aef484985

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