Skip to content

Commit 201e54d

Browse files
committed
fallback to latest version if none is found
1 parent 4d73320 commit 201e54d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

minecraft-modrinth/src/Services/MinecraftModrinthService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function getMinecraftVersion(Server $server): ?string
1414
{
1515
$version = $server->variables()->where(fn ($builder) => $builder->where('env_variable', 'MINECRAFT_VERSION')->orWhere('env_variable', 'MC_VERSION'))->first()?->server_value;
1616

17-
if ($version === 'latest') {
17+
if (!$version || $version === 'latest') {
1818
return config('minecraft-modrinth.latest_minecraft_version');
1919
}
2020

0 commit comments

Comments
 (0)