From 926b1a264bfb650414d7c9a454bd8c5ec8cfaabd Mon Sep 17 00:00:00 2001 From: Kir_Antipov Date: Wed, 3 Jan 2024 18:07:11 +0000 Subject: [PATCH] Fixed regex generator returning non-global RegExp --- src/games/minecraft/minecraft-version-lookup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/games/minecraft/minecraft-version-lookup.ts b/src/games/minecraft/minecraft-version-lookup.ts index aa332b5..63e94c8 100644 --- a/src/games/minecraft/minecraft-version-lookup.ts +++ b/src/games/minecraft/minecraft-version-lookup.ts @@ -160,7 +160,7 @@ export function getMinecraftVersionRegExp(versions?: Iterable): RegExp { pattern = `${version.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d")}|${pattern}`; } } - return pattern === VERSION_PATTERN ? VERSION_REGEX : new RegExp(pattern, "gs"); + return new RegExp(pattern, "gs"); } /**