From fe3bc0274a9d41ab07811a6547aacc45f4c155ba Mon Sep 17 00:00:00 2001 From: nobody42 <5514211-nobody42@users.noreply.gitlab.com> Date: Sun, 29 Mar 2020 07:24:24 +0200 Subject: [PATCH] Improved setLastVersion --- modules/internal/helpers.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/internal/helpers.js b/modules/internal/helpers.js index abf48854..00cdf6fe 100644 --- a/modules/internal/helpers.js +++ b/modules/internal/helpers.js @@ -343,8 +343,11 @@ helpers.formatVersion = function (version) { helpers.setLastVersion = function (type, version) { let requestVersion; - if(version != null && version != undefined) { + + if(version !== null && version !== undefined) { requestVersion = version.toString(); + } else if (version === null) { + return 'latest'; } if (type.includes('/angularjs/1.')) { version = '1.7.9';