Merge pull request #671 from strongloop/fix-memory-connector-regexp-error
Fix regexp error for the memory connector
This commit is contained in:
commit
106408dcc2
|
@ -461,14 +461,14 @@ function applyFilter(filter) {
|
||||||
return value.match(example);
|
return value.match(example);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (example.regexp)
|
|
||||||
return value.match(example.regexp);
|
|
||||||
|
|
||||||
if (example === undefined) {
|
if (example === undefined) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof example === 'object' && example !== null) {
|
if (typeof example === 'object' && example !== null) {
|
||||||
|
if (example.regexp)
|
||||||
|
return value.match(example.regexp);
|
||||||
|
|
||||||
// ignore geo near filter
|
// ignore geo near filter
|
||||||
if (example.near) {
|
if (example.near) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue