From 3eb68e07b54df379ebb5f2dd2c4cb151bffa9352 Mon Sep 17 00:00:00 2001 From: Kir_Antipov Date: Sun, 14 Jan 2024 22:49:53 +0300 Subject: [PATCH] Added a way to infer version name from a filename --- src/platforms/modrinth/modrinth-version.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/modrinth/modrinth-version.ts b/src/platforms/modrinth/modrinth-version.ts index 33452c7..d075b4a 100644 --- a/src/platforms/modrinth/modrinth-version.ts +++ b/src/platforms/modrinth/modrinth-version.ts @@ -415,7 +415,7 @@ export function packModrinthVersionInit(version: ModrinthVersionInit): ModrinthV ...{ ...version, files: undefined }, // Default values - name: version.name || version.version_number, + name: version.name || version.version_number || files[0] && FileInfo.of(files[0]).name, version_type: version.version_type ?? VersionType.RELEASE, featured: version.featured ?? true, dependencies: version.dependencies ?? [],