Skip to content

Commit 380a2e1

Browse files
committed
Auto merge of #2894 - Turbo87:unyanked-bug, r=jtgeibel
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. It looks like this bug was already present in the original implementation in #1857 r? `@jtgeibel`
2 parents 7bc3ce0 + 66a1cc4 commit 380a2e1

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)