Fixed range normalizer returning undefined

This commit is contained in:
Kir_Antipov 2024-01-03 18:06:40 +00:00
parent 49c8e7d535
commit 915ab6b52b

View file

@ -1,7 +1,7 @@
/* eslint-disable no-cond-assign */ /* eslint-disable no-cond-assign */
import { asArrayLike, isIterable } from "@/utils/collections"; 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 { MinecraftVersion, MinecraftVersionManifestEntry } from "./minecraft-version";
import { MinecraftVersionType } from "./minecraft-version-type"; import { MinecraftVersionType } from "./minecraft-version-type";
@ -139,7 +139,7 @@ export function normalizeMinecraftVersionRange(range: string | Iterable<string>
return normalizeMinecraftVersion(x); return normalizeMinecraftVersion(x);
})); }));
return parseVersionRange(normalizedRanges); return parseVersionRange(normalizedRanges) || noneVersionRange(normalizedRanges.join(" || "));
} }
/** /**