From 8da8154eddc3e29fec796b2ea3014c22866776cd Mon Sep 17 00:00:00 2001 From: Xaver Maierhofer Date: Wed, 27 Dec 2017 20:17:00 +0100 Subject: [PATCH] [BUGFIX] Version compare chars only --- lib/utils/version.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/version.js b/lib/utils/version.js index d691807..6a8cf86 100644 --- a/lib/utils/version.js +++ b/lib/utils/version.js @@ -88,7 +88,7 @@ define(function () { rb = parseB.exec(b); } if (!ra && rb) { // rb doesn't get exec-ed when ra == null - return (parseB.exec(b)[1].split('')[0] === '~') ? 1 : -1; + return (rb.length > 0 && rb[1].split('')[0] === '~') ? 1 : -1; } else if (ra && !rb) { return (ra[1].split('')[0] === '~') ? -1 : 1; }