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
I narrowed the code above down from trying to compile bootstrap-datetimepicker.js
I was able to do a workaround by assigning the regex to a variable and then returning it. Something with the return statement is causing problems.
validParts: function (type) {
if (type == "standard") {
var test = /hh?|HH?|p|P|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g;
return test;
} else if (type == "php") {
var test = /[dDjlNwzFmMnStyYaABgGhHis]/g;
return test;
} else {
throw new Error("Invalid format type.");
}
},
Getting an error with this code and a regex.
function() {
return /test?/g;
};
The text was updated successfully, but these errors were encountered: