Repository: ignite Updated Branches: refs/heads/master ef04f35fa -> 128ba0733
IGNITE-1596 Fixed version sort. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/128ba073 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/128ba073 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/128ba073 Branch: refs/heads/master Commit: 128ba0733692178de05eae183b97355b81715a1b Parents: ef04f35 Author: Andrey Novikov <[email protected]> Authored: Wed Jan 25 16:48:05 2017 +0700 Committer: Andrey Novikov <[email protected]> Committed: Wed Jan 25 16:48:05 2017 +0700 ---------------------------------------------------------------------- modules/web-console/backend/app/agent.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/128ba073/modules/web-console/backend/app/agent.js ---------------------------------------------------------------------- diff --git a/modules/web-console/backend/app/agent.js b/modules/web-console/backend/app/agent.js index 791ea50..961253f 100644 --- a/modules/web-console/backend/app/agent.js +++ b/modules/web-console/backend/app/agent.js @@ -650,14 +650,14 @@ module.exports.factory = function(_, fs, path, JSZip, socketio, settings, mongo) const bParts = b.split('.'); for (let i = 0; i < aParts.length; ++i) { - if (bParts.length === i) - return 1; + if (aParts[i] !== bParts[i]) + return aParts[i] < bParts[i] ? 1 : -1; + } - if (aParts[i] === aParts[i]) - continue; + if (aParts.length === bParts.length) + return 0; - return aParts[i] > bParts[i] ? 1 : -1; - } + return aParts.length < bParts.length ? 1 : -1; })); // Latest version of agent distribution.
