You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Function "sortMMDDStr" throws an error stating "dateRE" is undefined. Below is the code snippet and you can see the code
mtch = b.match(dateRE);
uses "dateRE" as it is, instead what it should be doing is calling it using
mtch = b.match(window.kg.sortService.dateRE);
I will submit a pull request and fix for the same.
-------- Code------
sortMMDDStr: function (a, b) {
var dateA, dateB, mtch, m, d, y;
mtch = a.match(window.kg.sortService.dateRE);
y = mtch[3];
d = mtch[2];
m = mtch[1];
if (m.length == 1) {
m = '0' + m;
}
if (d.length == 1) {
d = '0' + d;
}
dateA = y + m + d;
mtch = b.match(dateRE);
y = mtch[3];
d = mtch[2];
m = mtch[1];
if (m.length == 1) {
m = '0' + m;
}
if (d.length == 1) {
d = '0' + d;
}
dateB = y + m + d;
if (dateA == dateB) {
return 0;
}
if (dateA < dateB) {
return -1;
}
return 1;
},
The text was updated successfully, but these errors were encountered:
Function "sortMMDDStr" throws an error stating "dateRE" is undefined. Below is the code snippet and you can see the code
mtch = b.match(dateRE);
uses "dateRE" as it is, instead what it should be doing is calling it using
mtch = b.match(window.kg.sortService.dateRE);
I will submit a pull request and fix for the same.
-------- Code------
sortMMDDStr: function (a, b) {
var dateA, dateB, mtch, m, d, y;
mtch = a.match(window.kg.sortService.dateRE);
y = mtch[3];
d = mtch[2];
m = mtch[1];
if (m.length == 1) {
m = '0' + m;
}
if (d.length == 1) {
d = '0' + d;
}
dateA = y + m + d;
mtch = b.match(dateRE);
y = mtch[3];
d = mtch[2];
m = mtch[1];
if (m.length == 1) {
m = '0' + m;
}
if (d.length == 1) {
d = '0' + d;
}
dateB = y + m + d;
if (dateA == dateB) {
return 0;
}
if (dateA < dateB) {
return -1;
}
return 1;
},
The text was updated successfully, but these errors were encountered: