mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-08 16:26:37 +03:00
Fix version check in models directory [ci skip]
This commit is contained in:
parent
f5d230ba00
commit
1aef484985
|
@ -69,7 +69,12 @@ function isStableVersion(v) {
|
||||||
function getLatestVersion(modelId, compatibility) {
|
function getLatestVersion(modelId, compatibility) {
|
||||||
for (let [version, models] of Object.entries(compatibility)) {
|
for (let [version, models] of Object.entries(compatibility)) {
|
||||||
if (isStableVersion(version) && models[modelId]) {
|
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
Block a user