mirror of
https://github.com/modrinth/code.git
synced 2026-08-26 17:44:50 +00:00
fix: malformed versions causing versions list page to crash (#6315)
This commit is contained in:
@@ -109,15 +109,15 @@ const filterOptions = computed(() => {
|
||||
platform: [],
|
||||
}
|
||||
|
||||
const platformSet = new Set()
|
||||
const gameVersionSet = new Set()
|
||||
const channelSet = new Set()
|
||||
const platformSet = new Set<Filter>()
|
||||
const gameVersionSet = new Set<Filter>()
|
||||
const channelSet = new Set<Filter>()
|
||||
|
||||
for (const version of props.versions) {
|
||||
for (const loader of version.loaders) {
|
||||
for (const loader of Array.isArray(version.loaders) ? version.loaders : []) {
|
||||
platformSet.add(loader)
|
||||
}
|
||||
for (const gameVersion of version.game_versions) {
|
||||
for (const gameVersion of Array.isArray(version.game_versions) ? version.game_versions : []) {
|
||||
gameVersionSet.add(gameVersion)
|
||||
}
|
||||
channelSet.add(version.version_type)
|
||||
|
||||
Reference in New Issue
Block a user