Skip to content

Commit d70c7bf

Browse files
committed
Fix latest version computation
1 parent 43b2b0f commit d70c7bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/hexdocs/utils.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ defmodule Hexdocs.Utils do
1212
end
1313

1414
def latest_version(versions) do
15-
Enum.find(versions, &(&1.pre != [])) || List.first(versions)
15+
Enum.find(versions, &(&1.pre == [])) || List.first(versions)
1616
end
1717

1818
def latest_version?(package, version, all_versions) when package in @special_package_names do

0 commit comments

Comments
 (0)