mirror of https://github.com/explosion/spaCy.git
Fix version check in models directory [ci skip]
This commit is contained in:
parent
7489d02dea
commit
27c5795ea5
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue