Skip to content

Commit 4cd6c1a

Browse files
authored
fix modpacks no loader (#5707)
1 parent 3a8561c commit 4cd6c1a

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

apps/frontend/src/pages/[type]/[id]/version/[version].vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,8 @@ const modpackLoaders = computed<string[]>(() => {
714714
const noModpackLoader = computed(
715715
() =>
716716
project.value.project_type === 'modpack' &&
717-
modpackLoaders.value.length === 1 &&
718-
modpackLoaders.value[0] === 'minecraft',
717+
((modpackLoaders.value.length === 1 && modpackLoaders.value[0] === 'minecraft') ||
718+
modpackLoaders.value.length === 0),
719719
)
720720
721721
const description = computed(

packages/ui/src/components/project/ProjectPageVersions.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,10 @@ function getModpackLoaders(version: VersionWithDisplayUrlEnding): string[] {
343343
344344
function hasNoModLoader(loaders: string[]): boolean {
345345
return (
346-
props.project.project_type === 'modpack' && loaders.length === 1 && loaders[0] === 'minecraft'
346+
(props.project.project_type === 'modpack' &&
347+
loaders.length === 1 &&
348+
loaders[0] === 'minecraft') ||
349+
loaders.length === 0
347350
)
348351
}
349352

packages/ui/src/components/project/ProjectSidebarCompatibility.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,10 @@ const props = defineProps<{
141141
142142
const noModpackLoader = computed(
143143
() =>
144-
props.projectV3?.project_types.includes('modpack') &&
145-
props.projectV3?.mrpack_loaders.length === 1 &&
146-
props.projectV3?.mrpack_loaders[0] === 'minecraft',
144+
(props.projectV3?.project_types.includes('modpack') &&
145+
props.projectV3?.mrpack_loaders.length === 1 &&
146+
props.projectV3?.mrpack_loaders[0] === 'minecraft') ||
147+
props.projectV3?.mrpack_loaders.length === 0,
147148
)
148149
149150
const showEnvironments = computed(

0 commit comments

Comments
 (0)