From 9820d6b0ee28f7cd97dd7cf6b55915e4614e8d35 Mon Sep 17 00:00:00 2001 From: hc-github-team-secure-vault-core <82990506+hc-github-team-secure-vault-core@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:35:30 -0400 Subject: [PATCH] backport of fix changelog anchor (#23828) Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com> --- ui/lib/core/addon/helpers/changelog-url-for.js | 2 +- ui/tests/integration/helpers/changelog-url-for-test.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/lib/core/addon/helpers/changelog-url-for.js b/ui/lib/core/addon/helpers/changelog-url-for.js index fc7171b29..543091ea0 100644 --- a/ui/lib/core/addon/helpers/changelog-url-for.js +++ b/ui/lib/core/addon/helpers/changelog-url-for.js @@ -26,7 +26,7 @@ export function changelogUrlFor([version]) { const versionNumber = version.split('+')[0].split('.').join(''); // only recent versions have a predictable url - if (versionNumber >= '143') { + if (versionNumber >= 143) { return url.concat(versionNumber); } } catch (e) { diff --git a/ui/tests/integration/helpers/changelog-url-for-test.js b/ui/tests/integration/helpers/changelog-url-for-test.js index 6c6e03fda..ba2a65c68 100644 --- a/ui/tests/integration/helpers/changelog-url-for-test.js +++ b/ui/tests/integration/helpers/changelog-url-for-test.js @@ -31,4 +31,9 @@ module('Integration | Helper | changelog-url-for', function (hooks) { const result = changelogUrlFor(['']); assert.strictEqual(result, CHANGELOG_URL); }); + + test('it builds the url for double-digit versions', function (assert) { + const result = changelogUrlFor(['1.13.0+ent']); + assert.strictEqual(result, CHANGELOG_URL.concat('1130')); + }); });