backport of fix changelog anchor (#23828)

Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com>
This commit is contained in:
hc-github-team-secure-vault-core 2023-10-26 12:35:30 -04:00 committed by GitHub
parent 19d740c312
commit 9820d6b0ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -26,7 +26,7 @@ export function changelogUrlFor([version]) {
const versionNumber = version.split('+')[0].split('.').join(''); const versionNumber = version.split('+')[0].split('.').join('');
// only recent versions have a predictable url // only recent versions have a predictable url
if (versionNumber >= '143') { if (versionNumber >= 143) {
return url.concat(versionNumber); return url.concat(versionNumber);
} }
} catch (e) { } catch (e) {

View File

@ -31,4 +31,9 @@ module('Integration | Helper | changelog-url-for', function (hooks) {
const result = changelogUrlFor(['']); const result = changelogUrlFor(['']);
assert.strictEqual(result, CHANGELOG_URL); 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'));
});
}); });