This commit is contained in:
2020-08-20 11:44:32 +02:00
parent 4715fc1814
commit 6aceefeb2f
2891 changed files with 11239 additions and 347539 deletions

View File

@@ -516,6 +516,10 @@ SchemaString.prototype.match = function match(regExp, message) {
return false;
}
// In case RegExp happens to have `/g` flag set, we need to reset the
// `lastIndex`, otherwise `match` will intermittently fail.
regExp.lastIndex = 0;
const ret = ((v != null && v !== '')
? regExp.test(v)
: true);