Skip to content

Commit 66a1cc4

Browse files
committed
crate.version: Fix latestUnyankedVersion bug
`latestStableVersion` is already guaranteed to be `null` because of the previous condition. I assume the original intention here was to check for `latestUnyankedVersion` instead.
1 parent 8b912f2 commit 66a1cc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/routes/crate/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default Route.extend({
3232
// Find the latest version that not yanked.
3333
const latestUnyankedVersion = versions.find(version => !version.yanked);
3434

35-
if (latestStableVersion == null) {
35+
if (latestUnyankedVersion == null) {
3636
// There's not even any unyanked version...
3737
params.version_num = maxVersion;
3838
} else {

0 commit comments

Comments
 (0)