Skip to content

Commit

Permalink
PackageDetail.vue: Fix isOld condition
Browse files Browse the repository at this point in the history
  • Loading branch information
dmstern committed Nov 26, 2018
1 parent b6d7f64 commit c230093
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/views/PackageDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ export default class PackageDetail extends Vue {
return false;
}
const isOld = typeof this.data.packageDetail.distTags.latest === 'string'
&& this.data.currentPackage.version !== this.data.packageDetail.distTags.latest;
&& this.data.currentPackage.version !== undefined
&& this.data.currentPackage.version < this.data.packageDetail.distTags.latest;
this.showAlert = isOld;
return isOld;
}
Expand Down

0 comments on commit c230093

Please sign in to comment.