From c23009340e26c1441d9048ee2e4a7f1c760e39fc Mon Sep 17 00:00:00 2001 From: Daniel Morgenstern Date: Wed, 19 Sep 2018 16:03:21 +0200 Subject: [PATCH] PackageDetail.vue: Fix isOld condition --- src/views/PackageDetail.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/PackageDetail.vue b/src/views/PackageDetail.vue index 5a1f648..18837e6 100644 --- a/src/views/PackageDetail.vue +++ b/src/views/PackageDetail.vue @@ -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; }