fix modpacks no loader (#5707)

This commit is contained in:
Truman Gao
2026-03-30 02:21:20 -07:00
committed by GitHub
parent 3a8561cf35
commit 4cd6c1a72d
3 changed files with 10 additions and 6 deletions

View File

@@ -714,8 +714,8 @@ const modpackLoaders = computed<string[]>(() => {
const noModpackLoader = computed(
() =>
project.value.project_type === 'modpack' &&
modpackLoaders.value.length === 1 &&
modpackLoaders.value[0] === 'minecraft',
((modpackLoaders.value.length === 1 && modpackLoaders.value[0] === 'minecraft') ||
modpackLoaders.value.length === 0),
)
const description = computed(

View File

@@ -343,7 +343,10 @@ function getModpackLoaders(version: VersionWithDisplayUrlEnding): string[] {
function hasNoModLoader(loaders: string[]): boolean {
return (
props.project.project_type === 'modpack' && loaders.length === 1 && loaders[0] === 'minecraft'
(props.project.project_type === 'modpack' &&
loaders.length === 1 &&
loaders[0] === 'minecraft') ||
loaders.length === 0
)
}

View File

@@ -141,9 +141,10 @@ const props = defineProps<{
const noModpackLoader = computed(
() =>
props.projectV3?.project_types.includes('modpack') &&
props.projectV3?.mrpack_loaders.length === 1 &&
props.projectV3?.mrpack_loaders[0] === 'minecraft',
(props.projectV3?.project_types.includes('modpack') &&
props.projectV3?.mrpack_loaders.length === 1 &&
props.projectV3?.mrpack_loaders[0] === 'minecraft') ||
props.projectV3?.mrpack_loaders.length === 0,
)
const showEnvironments = computed(