Skip to content

Commit 8335e5d

Browse files
committed
Auto merge of #2971 - jtgeibel:fix-prerelease-only, r=Turbo87
Fix version logic when there are only pre-releases It looks like fixing the bug in #2894 exposed this bug. When there are only pre-release versions of a crate, the version number needs to be extracted so that the version object can be located again a few lines later. This could probably be refactored, but for now this removes the spurious error notification shown in the UI. r? `@Turbo87`
2 parents a50f6f6 + 8165ad5 commit 8335e5d

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
@@ -36,7 +36,7 @@ export default class VersionRoute extends Route {
3636
// There's not even any unyanked version...
3737
params.version_num = maxVersion;
3838
} else {
39-
params.version_num = latestUnyankedVersion;
39+
params.version_num = latestUnyankedVersion.num;
4040
}
4141
} else {
4242
params.version_num = latestStableVersion.num;

0 commit comments

Comments
 (0)