]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Patch to regular expression that was causing a lint warning (redo #2220)
authorIskren Chernev <iskren.chernev@gmail.com>
Mon, 4 May 2015 04:56:02 +0000 (21:56 -0700)
committerIskren Chernev <iskren.chernev@gmail.com>
Mon, 4 May 2015 04:56:02 +0000 (21:56 -0700)
src/lib/locale/set.js

index b9eb5ed6e2132554678e2fb529321c90087022bb..32db2ad79527ff61c45ae3ffcace3246602f6c17 100644 (file)
@@ -10,5 +10,5 @@ export function set (config) {
     }
     // Lenient ordinal parsing accepts just a number in addition to
     // number + (possibly) stuff coming from _ordinalParseLenient.
-    this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + /\d{1,2}/.source);
+    this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source);
 }