diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js index c27146dec..2fe3d448e 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js @@ -31,7 +31,7 @@ RED.palette.editor = (function() { var eventTimers = {}; var activeFilter = ""; - var semverre = /^(?\d+)(\.(?\d+))?(\.(?\d+))?(-(?
[0-9A-Za-z-]+))?(\.(?[0-9A-Za-z-.]+))?$/;
+    var semverre = /^(\d+)(\.(\d+))?(\.(\d+))?(-([0-9A-Za-z-]+))?(\.([0-9A-Za-z-.]+))?$/;
     var NUMBERS_ONLY = /^\d+$/;
 
     function SemVerPart(part) {
@@ -61,8 +61,8 @@ RED.palette.editor = (function() {
     };
 
     function SemVer(ver) {
-        var groups = ver.match( semverre ).groups;
-        this.parts = [ new SemVerPart( groups.major ), new SemVerPart( groups.minor ), new SemVerPart( groups.patch ), new SemVerPart( groups.pre ), new SemVerPart( groups.build ) ];
+        var groups = ver.match( semverre );
+        this.parts = [ new SemVerPart( groups[1] ), new SemVerPart( groups[3] ), new SemVerPart( groups[5] ), new SemVerPart( groups[7] ), new SemVerPart( groups[9] ) ];
     }
 
     SemVer.prototype.compare = function(other) {