Skip to content

Commit 99afd2f

Browse files
yodaldevoidsgrif
authored andcommitted
Disable "Version does not exist" error if the version is null
1 parent 31b44cc commit 99afd2f

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
@@ -29,7 +29,7 @@ export default Ember.Route.extend({
2929
return crate.get('versions')
3030
.then(versions => {
3131
const version = versions.find(version => version.get('num') === params.version_num);
32-
if (!version) {
32+
if (params.version_num && !version) {
3333
this.controllerFor('application').set('nextFlashError',
3434
`Version '${params.version_num}' of crate '${crate.get('name')}' does not exist`);
3535
}

0 commit comments

Comments
 (0)