Skip to content

Commit 7ce247c

Browse files
authored
Use semverNumbersOnly
1 parent e640ed0 commit 7ce247c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

js/helpinject.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@
6161
console.error('Unable to parse release information', e);
6262
}
6363
if (typeof lastest.tag_name !== "undefined") {
64-
// Drop the 'v' from the start of the tag name
65-
var version = lastest.tag_name.substr(0, 1) == 'v' ? lastest.tag_name.substr(1) : lastest.tag_name;
6664
// Run the callback
67-
cb(semverRegex().test(version) ? semverRegex().exec(version)[0] : null);
65+
cb(semverRegex().test(version) ? semverNumbersOnly(semverRegex().exec(version)[0]) : null);
6866
} else {
6967
console.error('GitHub did not return the expected data');
7068
}

0 commit comments

Comments
 (0)