mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-26 16:06:33 +03:00
Better replace for complex semver comparisons
This commit is contained in:
parent
6ca89b130a
commit
25786df952
@ -272,7 +272,7 @@ module.exports.pluginHandler = function (parent) {
|
|||||||
// MeshCentral doesn't adhere to semantic versioning (due to the -<alpha_char> at the end of the version)
|
// MeshCentral doesn't adhere to semantic versioning (due to the -<alpha_char> at the end of the version)
|
||||||
// Convert the letter to ASCII for a "true" version number comparison
|
// Convert the letter to ASCII for a "true" version number comparison
|
||||||
var mcCurVer = parent.currentVer.replace(/-(.)$/, (m, p1) => { return p1.charCodeAt(0); });
|
var mcCurVer = parent.currentVer.replace(/-(.)$/, (m, p1) => { return p1.charCodeAt(0); });
|
||||||
var piCompatVer = newconf.meshCentralCompat.replace(/-(.)$/, (m, p1) => { return p1.charCodeAt(0); });
|
var piCompatVer = newconf.meshCentralCompat.replace(/-(.)\b/g, (m, p1) => { return p1.charCodeAt(0); });
|
||||||
latestRet.push({
|
latestRet.push({
|
||||||
"id": curconf._id,
|
"id": curconf._id,
|
||||||
"installedVersion": curconf.version,
|
"installedVersion": curconf.version,
|
||||||
|
Loading…
Reference in New Issue
Block a user