From 915ab6b52b4eac03e1a0ea10f19d7addbfb5a150 Mon Sep 17 00:00:00 2001 From: Kir_Antipov Date: Wed, 3 Jan 2024 18:06:40 +0000 Subject: [PATCH] Fixed range normalizer returning `undefined` --- src/games/minecraft/minecraft-version-lookup.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/games/minecraft/minecraft-version-lookup.ts b/src/games/minecraft/minecraft-version-lookup.ts index a2b7655..aa332b5 100644 --- a/src/games/minecraft/minecraft-version-lookup.ts +++ b/src/games/minecraft/minecraft-version-lookup.ts @@ -1,7 +1,7 @@ /* eslint-disable no-cond-assign */ import { asArrayLike, isIterable } from "@/utils/collections"; -import { VersionRange, parseVersionRange } from "@/utils/versioning"; +import { VersionRange, noneVersionRange, parseVersionRange } from "@/utils/versioning"; import { MinecraftVersion, MinecraftVersionManifestEntry } from "./minecraft-version"; import { MinecraftVersionType } from "./minecraft-version-type"; @@ -139,7 +139,7 @@ export function normalizeMinecraftVersionRange(range: string | Iterable return normalizeMinecraftVersion(x); })); - return parseVersionRange(normalizedRanges); + return parseVersionRange(normalizedRanges) || noneVersionRange(normalizedRanges.join(" || ")); } /**