Fix regexp error for the memory connector
- Check for undefined/null values when accessing `regexp` key
This commit is contained in:
parent
ff6a2228f2
commit
4cd428a726
|
@ -461,14 +461,14 @@ function applyFilter(filter) {
|
|||
return value.match(example);
|
||||
}
|
||||
|
||||
if (example.regexp)
|
||||
return value.match(example.regexp);
|
||||
|
||||
if (example === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (typeof example === 'object' && example !== null) {
|
||||
if (example.regexp)
|
||||
return value.match(example.regexp);
|
||||
|
||||
// ignore geo near filter
|
||||
if (example.near) {
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue