Fix sorting on version filtering (#389)

This commit is contained in:
Prospector 2022-03-05 16:35:53 -08:00 committed by GitHub
parent a7ce9aaca5
commit 15717ddca0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,14 +65,13 @@ export default {
methods: {
getValidVersions() {
if (!this.cachedValidVersions) {
const temp = new Set()
for (const version of this.versions) {
version.game_versions.forEach((v) => {
temp.add(v)
})
}
this.cachedValidVersions = Array.from(temp)
this.cachedValidVersions.sort().reverse()
this.cachedValidVersions = this.$tag.gameVersions
.map((x) => x.version)
.filter((gameVer) =>
this.versions.some((projVer) =>
projVer.game_versions.includes(gameVer)
)
)
}
return this.cachedValidVersions
},