@@ -86,10 +86,17 @@ export function provideDownloadModalProvider(
8686 const tags = useGeneratedState ( )
8787
8888 const shouldResolveDependencies = computed (
89- ( ) => ! ! options . project . value && ! ! options . selectedVersion . value ,
89+ ( ) =>
90+ ! ! options . project . value &&
91+ ! ! options . selectedVersion . value &&
92+ ! ! options . currentGameVersion . value ,
9093 )
9194 const dependencyResolutionPreferences = computed ( ( ) =>
92- createResolutionPreferences ( options . selectedVersion . value , options . currentPlatform . value ) ,
95+ createResolutionPreferences (
96+ options . selectedVersion . value ,
97+ options . currentGameVersion . value ,
98+ options . currentPlatform . value ,
99+ ) ,
93100 )
94101
95102 const { data : dependencyResolution , isFetching : dependencyResolutionFetching } = useQuery ( {
@@ -309,10 +316,12 @@ export function provideDownloadModalProvider(
309316 } )
310317
311318 async function preloadDependenciesForSelection ( selection : ProjectDownloadSelection ) {
312- if ( ! options . project . value || ! selection . selectedVersion ) return
319+ if ( ! options . project . value || ! selection . selectedVersion || ! selection . currentGameVersion )
320+ return
313321
314322 const preferences = createResolutionPreferences (
315323 selection . selectedVersion ,
324+ selection . currentGameVersion ,
316325 selection . currentPlatform ,
317326 )
318327
@@ -548,10 +557,11 @@ function dependencyProjectsQueryOptions(
548557
549558function createResolutionPreferences (
550559 version : Labrinth . Versions . v3 . Version | null ,
560+ currentGameVersion : string | null ,
551561 currentPlatform : string | null ,
552562) : Labrinth . Content . v3 . ResolutionPreferences {
553563 return {
554- game_versions : version ?. game_versions || [ ] ,
564+ game_versions : currentGameVersion ? [ currentGameVersion ] : [ ] ,
555565 loaders : currentPlatform ? [ currentPlatform ] : version ?. loaders || [ ] ,
556566 }
557567}
0 commit comments